-
-
Notifications
You must be signed in to change notification settings - Fork 31
Add tool support and tests #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tool support and tests #43
Conversation
Simplify schema and vision support
2228895
to
5443a2c
Compare
To avoid error about supports_tools= parameter in constructor
Testing this with:
It output:
|
And a more complex example: llm install llm-tools-datasette
llm chat -m openrouter/openai/gpt-5 --td -T 'Datasette("https://datasette.io/content")' Then in the chat:
Then:
Which worked - transcript here: https://gist.github.com/simonw/4b7c889ac6ed22b7d691f4981dedbe05 |
@jamessanford this is excellent, thanks very much for this. |
Here's a model that does not support tools: llm -m openrouter/nousresearch/hermes-2-pro-llama-3-8b hi -T llm_version Output:
So that works as it should. |
This resolves:
Note that streaming tool calls to certain models may still fail in version of llm up to 0.26 [edit: fixed in llm 0.27] due to:
Note:
This is an alternate, smaller PR equivalent to #42. Compared to #42, the cassette recordings now only include a subset of models supported by OpenRouter, instead of the entire 400k response.