nsarrazin HF Staff commited on
Commit
be1f03e
·
1 Parent(s): 6cb4b46

fix(prompt): better prompting when gradio tools return a file

Browse files
Files changed (1) hide show
  1. src/lib/server/tools/index.ts +3 -2
src/lib/server/tools/index.ts CHANGED
@@ -276,8 +276,9 @@ export function getCallMethod(tool: Omit<BaseTool, "call">): BackendCall {
276
  );
277
 
278
  toolOutputs.push({
279
- [tool.name + "-" + idx.toString()]:
280
- "A file has been generated. Answer as if the user can already see the file. Do not try to insert the file. The user can already see the file. Do not try to describe the file as the model cannot interact with it. Be concise.",
 
281
  });
282
  } else {
283
  for (const output of arrayedOutput) {
 
276
  );
277
 
278
  toolOutputs.push({
279
+ [tool.name +
280
+ "-" +
281
+ idx.toString()]: `Only and always answer: 'I used the tool ${tool.displayName}, here is the result.' Don't add anything else.`,
282
  });
283
  } else {
284
  for (const output of arrayedOutput) {