From 11b7ccda079a9224759a726cc64dcc222962663f Mon Sep 17 00:00:00 2001 From: Timothy Carambat Date: Mon, 21 Oct 2024 13:56:37 -0700 Subject: [PATCH] Fix tooling examples (#2513) * Fix incorrect json API description. * small edits and validity checks * remove console.logs * unset and recheck changes --------- Co-authored-by: Adam --- server/utils/agents/aibitat/providers/helpers/untooled.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/utils/agents/aibitat/providers/helpers/untooled.js b/server/utils/agents/aibitat/providers/helpers/untooled.js index 11fbfec8b..774bb6915 100644 --- a/server/utils/agents/aibitat/providers/helpers/untooled.js +++ b/server/utils/agents/aibitat/providers/helpers/untooled.js @@ -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`;