diff --git a/core/llm/llm.test.ts b/core/llm/llm.test.ts index fc1ede0bc..5535bae30 100644 --- a/core/llm/llm.test.ts +++ b/core/llm/llm.test.ts @@ -186,7 +186,9 @@ function testLLM( // For Mistral, if no tool calls were received, skip the test // as it may not support forced tool use if (args === "" && llm.constructor.name === "Mistral") { - console.log("Mistral did not return tool calls, skipping assertion"); + console.log( + "Mistral did not return tool calls, skipping assertion", + ); return; } diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts index 32568c2e9..75ea7ee91 100644 --- a/core/llm/openaiTypeConverters.ts +++ b/core/llm/openaiTypeConverters.ts @@ -200,7 +200,7 @@ export function fromChatCompletionChunk( arguments: (tool_call as any).function?.arguments, }, })); - + if (toolCalls.length > 0) { return { role: "assistant",