Shouldn't tool_choice = "required" enforce that the assistant always use one of the tools? #3007
-
I am running ollama locally with llama3.1 and I am trying to limit the model actions to always call one of the available tools, but without success. I have set tool_choice = "required", but that seems not be enough. I know better models get the job done, but I want to understand how tensorzero works. config/tensorzero.toml
config/tools/list_files.json
config/tools/read_files.json
config/tools/terminate.json
test.py
If i try something like 'read the file docker compose' (I have a docker compose file for the tensorzero gateway) it will just not use the tools every time. Shouldn't a tool always be called? tks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jalvespinto - this is an issue with Ollama as it ignores https://github.com/ollama/ollama/blob/main/docs/openai.md Thanks |
Beta Was this translation helpful? Give feedback.
Hi @jalvespinto - this is an issue with Ollama as it ignores
tool_choice
. TensorZero passes that along to the model provider. It'll work correctly with other providers.https://github.com/ollama/ollama/blob/main/docs/openai.md
Thanks