diff options
Diffstat (limited to 'llm.go')
-rw-r--r-- | llm.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -146,6 +146,10 @@ func (op OpenAIer) ParseChunk(data []byte) (*models.TextChunk, error) { } if len(llmchunk.Choices[len(llmchunk.Choices)-1].Delta.ToolCalls) > 0 { resp.ToolChunk = llmchunk.Choices[len(llmchunk.Choices)-1].Delta.ToolCalls[0].Function.Arguments + fname := llmchunk.Choices[len(llmchunk.Choices)-1].Delta.ToolCalls[0].Function.Name + if fname != "" { + resp.FuncName = fname + } } if llmchunk.Choices[len(llmchunk.Choices)-1].FinishReason == "stop" { if resp.Chunk != "" { |