Skip to content

Commit

Permalink
Fix tooling examples (#2513)
Browse files Browse the repository at this point in the history
* Fix incorrect json API description.

* small edits and validity checks

* remove console.logs

* unset and recheck changes

---------

Co-authored-by: Adam <[email protected]>
  • Loading branch information
timothycarambat and phazei authored Oct 21, 2024
1 parent 0524aad commit 11b7ccd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/utils/agents/aibitat/providers/helpers/untooled.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ ${JSON.stringify(def.parameters.properties, null, 4)}\n`;

if (Array.isArray(def.examples)) {
def.examples.forEach(({ prompt, call }) => {
shotExample += `Query: "${prompt}"\nJSON: ${call}\n`;
shotExample += `Query: "${prompt}"\nJSON: ${JSON.stringify({
name: def.name,
arguments: safeJsonParse(call, {}),
})}\n`;
});
}
output += `${shotExample}-----------\n`;
Expand Down

0 comments on commit 11b7ccd

Please sign in to comment.