feat(openai-llm): use function call index instead of type

This commit is contained in:
ItzCrazyKns
2025-12-28 01:21:33 +05:30
parent b450d0e668
commit 55a4b9d436

View File

@@ -167,7 +167,7 @@ class OpenAILLM extends BaseLLM<OpenAIConfig> {
contentChunk: chunk.choices[0].delta.content || '', contentChunk: chunk.choices[0].delta.content || '',
toolCallChunk: toolCallChunk:
toolCalls?.map((tc) => { toolCalls?.map((tc) => {
if (tc.type === 'function') { if (!recievedToolCalls[tc.index]) {
const call = { const call = {
name: tc.function?.name!, name: tc.function?.name!,
id: tc.id!, id: tc.id!,