summaryrefslogtreecommitdiff
path: root/llm.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-25 20:06:56 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-25 20:06:56 +0300
commit888c9fec652b82174702c710f54f7d64f194315c (patch)
tree883051d653dda2d57b227670bfd3721bf6cf426a /llm.go
parent4f07994bdc3d23421cf3941af3edc18c05ffc94b (diff)
Chore: linter complaints
Diffstat (limited to 'llm.go')
-rw-r--r--llm.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/llm.go b/llm.go
index ebda29b..fdb0b33 100644
--- a/llm.go
+++ b/llm.go
@@ -216,13 +216,11 @@ func (op LCPChat) ParseChunk(data []byte) (*models.TextChunk, error) {
logger.Warn("LCPChat ParseChunk: no choices in response", "data", string(data))
return &models.TextChunk{Finished: true}, nil
}
-
lastChoice := llmchunk.Choices[len(llmchunk.Choices)-1]
resp := &models.TextChunk{
Chunk: lastChoice.Delta.Content,
Reasoning: lastChoice.Delta.ReasoningContent,
}
-
// Check for tool calls in all choices, not just the last one
for _, choice := range llmchunk.Choices {
if len(choice.Delta.ToolCalls) > 0 {
@@ -237,7 +235,6 @@ func (op LCPChat) ParseChunk(data []byte) (*models.TextChunk, error) {
break // Process only the first tool call
}
}
-
if lastChoice.FinishReason == "stop" {
if resp.Chunk != "" {
logger.Error("text inside of finish llmchunk", "chunk", llmchunk)