Skip to content

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

Merged
ParthSareen merged 3 commits intoollama:mainfrom
ddbit:main
Feb 14, 2025
Merged

Update of tools.py to nicely manage numbers instead of concat strings#443
ParthSareen merged 3 commits intoollama:mainfrom
ddbit:main

Conversation

@ddbit
Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
Contributor Author

ddbit commented Feb 14, 2025

Sure thing. Pls check now the PR

Comment thread examples/tools.py Outdated
Comment thread examples/tools.py Outdated
@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