Skip to content

Conversation

@AstraBert
Copy link
Member

Adding ToolCallBlock support for Ollama (e2e tested)

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 16, 2025
Comment on lines 275 to 279
# keep this code for compatibility with older chat histories
if (
"tool_calls" in message.additional_kwargs
and len(cur_ollama_message.get("tool_calls", [])) == 0
):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a check here to avoid conflicts between legacy and new tool calls (cc @logan-markewich)

Copy link
Collaborator

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Works great

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 27, 2025
@logan-markewich logan-markewich merged commit b22fc1f into main Oct 27, 2025
10 of 11 checks passed
@logan-markewich logan-markewich deleted the clelia/ollama-tool-call-block branch October 27, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants