We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
role: "tool"
1 parent c5fbd54 commit 1dfaae2Copy full SHA for 1dfaae2
packages/tiny-agents/src/lib/webServer.ts
@@ -82,18 +82,14 @@ export function startServer(agent: Agent): void {
82
res.write(`data: ${JSON.stringify(chunk)}\n\n`);
83
} else {
84
/// Tool call info
85
- /// /!\ We format it as a regular chunk!
+ /// /!\ We format it as a regular chunk of role = "tool"
86
const chunkToolcallInfo = {
87
choices: [
88
{
89
index: 0,
90
delta: {
91
- role: "assistant",
92
- content:
93
- "<tool_call_info>" +
94
- `Tool[${chunk.name}] ${chunk.tool_call_id}\n` +
95
- chunk.content +
96
- "</tool_call_info>",
+ role: "tool",
+ content: `Tool[${chunk.name}] ${chunk.tool_call_id}\n` + chunk.content,
97
},
98
99
],
0 commit comments