Spaces:
Running
Running
fix(prompt): better prompting when gradio tools return a file
Browse files
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 +
|
280 |
-
|
|
|
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) {
|