Fixed CLI tool
All checks were successful
Publish Library / Build NPM Project (push) Successful in 39s
Publish Library / Tag Version (push) Successful in 10s

This commit is contained in:
2026-03-01 18:11:25 -05:00
parent 6454548364
commit 5d34652d46
3 changed files with 10 additions and 7 deletions

View File

@@ -148,6 +148,7 @@ export class OpenAi extends LLMProvider {
try {
const args = JSONAttemptParse(toolCall.function.arguments, {});
const result = await tool.fn(args, options.stream, this.ai);
console.log(result);
return {role: 'tool', tool_call_id: toolCall.id, content: JSONSanitize(result)};
} catch (err: any) {
return {role: 'tool', tool_call_id: toolCall.id, content: JSONSanitize({error: err?.message || err?.toString() || 'Unknown'})};