No proper support for Tool Messages? #234

Closed
opened 2026-02-15 16:28:57 -05:00 by yindo · 1 comment
Owner

Originally created by @sadaisystems on GitHub (Mar 4, 2025).

According to example and definition of Message model, it seems like there is no way to actually represent executed tool message as a Message model, only using dictionary?

I'm arriving at this conclusion because Message model doesn't have a filed called "name" which is required for executed tool message as per the example.

Why is this the case? Any plans on unifying message abstraction in the future?

Originally created by @sadaisystems on GitHub (Mar 4, 2025). According to [example](https://github.com/ollama/ollama-python/blob/main/examples/tools.py) and definition of Message model, it seems like there is no way to actually represent executed tool message as a Message model, only using dictionary? I'm arriving at this conclusion because Message model doesn't have a filed called "name" which is required for executed tool message as per the example. Why is this the case? Any plans on unifying message abstraction in the future?
yindo closed this issue 2026-02-15 16:28:57 -05:00
Author
Owner

@ParthSareen commented on GitHub (Jul 1, 2025):

This should help: https://github.com/ollama/ollama-python/blob/main/ollama/_types.py#L287-L309

@ParthSareen commented on GitHub (Jul 1, 2025): This should help: https://github.com/ollama/ollama-python/blob/main/ollama/_types.py#L287-L309
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#234