Commit 8112006

mo khan <mo@mokhan.ca>
2026-01-07 23:48:47
fix: collect tool calls in each chunk
1 parent 068545a
Changed files (1)
lib
net
lib/net/llm/ollama.rb
@@ -31,9 +31,9 @@ module Net
 
             content += delta_content if delta_content
             thinking += delta_thinking if delta_thinking
+            tool_calls += normalize_tool_calls(msg["tool_calls"]) if msg["tool_calls"]
 
             if chunk["done"]
-              tool_calls = normalize_tool_calls(msg["tool_calls"])
               block.call({
                 type: :complete,
                 content: content,