diff --git a/src/lib/models/providers/openai/openaiLLM.ts b/src/lib/models/providers/openai/openaiLLM.ts index a40714e..dfad274 100644 --- a/src/lib/models/providers/openai/openaiLLM.ts +++ b/src/lib/models/providers/openai/openaiLLM.ts @@ -167,7 +167,7 @@ class OpenAILLM extends BaseLLM { contentChunk: chunk.choices[0].delta.content || '', toolCallChunk: toolCalls?.map((tc) => { - if (tc.type === 'function') { + if (!recievedToolCalls[tc.index]) { const call = { name: tc.function?.name!, id: tc.id!,