TypeError: AsyncClient.chat() got an unexpected keyword argument 'tools' #221

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

Originally created by @SCP001C on GitHub (Feb 17, 2025).

When running the example code from: async-tools.py I got error message "TypeError: AsyncClient.chat() got an unexpected keyword argument 'tools'".

Seems like chat() doesn't support argument "tools" anymore. Is there any solution to implement tool calling with Ollama? Thank you very much.

Originally created by @SCP001C on GitHub (Feb 17, 2025). When running the example code from: [async-tools.py](https://github.com/ollama/ollama-python/blob/main/examples/async-tools.py) I got error message "TypeError: AsyncClient.chat() got an unexpected keyword argument 'tools'". Seems like chat() doesn't support argument "tools" anymore. Is there any solution to implement tool calling with Ollama? Thank you very much.
yindo closed this issue 2026-02-15 16:28:51 -05:00
Author
Owner

@ParthSareen commented on GitHub (Feb 18, 2025):

Hey! Seems like you might be running an older version of the library? What version are you on? Is it 0.4.7?

@ParthSareen commented on GitHub (Feb 18, 2025): Hey! Seems like you might be running an older version of the library? What version are you on? Is it `0.4.7`?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#221