Skip to content
Snippets Groups Projects
Commit c6eee12e authored by thucpn's avatar thucpn
Browse files

update tool call callback

parent 1da51b49
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ export async function callTools({
}: {
toolCalls: ToolCall[];
tools: BaseToolWithCall[];
writeEvent?: (text: string, step: number, totalSteps: number) => void;
writeEvent?: (text: string, step: number) => void;
}): Promise<ChatMessage[]> {
if (toolCalls.length === 0) return [];
......@@ -30,7 +30,7 @@ export async function callTools({
if (!tool) throw new Error(`Tool ${toolCall.name} not found`);
const toolMsg = await callSingleTool(tool, toolCall, (text) => {
writeEvent?.(text, step, totalSteps);
writeEvent?.(text, step);
});
toolMsgs.push(toolMsg);
}
......
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