Skip to content

Conversation

@MichaelDoyle
Copy link
Member

I'm not sure if it was actually having any real-world impact, but I noticed while debugging another issue that we were sending 2 tool responses to back to the model, the second one being mostly empty.

{
  model: 'granite4:latest',
  options: {},
  stream: false,
  tools: [ { type: 'function', function: [Object] } ],
  messages: [
    {
      role: 'user',
      content: "what's the weather in cambridge, ma?",
      images: undefined,
      tool_calls: undefined
    },
    {
      role: 'assistant',
      content: '',
      images: undefined,
      tool_calls: [Array]
    },
    {
      role: 'tool',
      content: '{"temperatureF":103,"conditions":"Sunny"}'
    },
    {
      role: 'tool',
      content: '',
      images: undefined,
      tool_calls: undefined
    }
  ]
} ollama request (chat)

Checklist (if applicable):

@MichaelDoyle MichaelDoyle merged commit 8e1c4c9 into main Oct 17, 2025
5 checks passed
@MichaelDoyle MichaelDoyle deleted the fix-double-tool branch October 17, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants