Skip to content
Snippets Groups Projects
Unverified Commit 11b7ccda authored by Timothy Carambat's avatar Timothy Carambat Committed by GitHub
Browse files

Fix tooling examples (#2513)


* Fix incorrect json API description.

* small edits and validity checks

* remove console.logs

* unset and recheck changes

---------

Co-authored-by: default avatarAdam <phazei@gmail.com>
parent 0524aadf
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,10 @@ ${JSON.stringify(def.parameters.properties, null, 4)}\n`; ...@@ -33,7 +33,10 @@ ${JSON.stringify(def.parameters.properties, null, 4)}\n`;
if (Array.isArray(def.examples)) { if (Array.isArray(def.examples)) {
def.examples.forEach(({ prompt, call }) => { 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`; output += `${shotExample}-----------\n`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment