Skip to content
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

Update of tools.py to nicely manage numbers instead of concat strings #443

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

ddbit
Copy link
Contributor

@ddbit ddbit commented Feb 13, 2025

Without this fix the prompt "What is 30 plus 12?" produces '3012'
With this fix the result is 42

@ParthSareen
Copy link
Contributor

Didn't add this on purpose initially to show that LLM tool use doesn't always conform exactly to schema. Happy to add this if you can add a quick comment as to why the cast exists. Thanks!

@ddbit
Copy link
Contributor Author

ddbit commented Feb 14, 2025

Sure thing. Pls check now the PR

examples/tools.py Outdated Show resolved Hide resolved
examples/tools.py Outdated Show resolved Hide resolved
@ParthSareen ParthSareen merged commit aec125c into ollama:main Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants