Skip to content

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

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

ParthSareen merged 3 commits into
ollama:mainfrom
ddbit:main

Conversation

@ddbit

@ddbit ddbit commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

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

ddbit commented Feb 14, 2025

Copy link
Copy Markdown
Contributor Author

Sure thing. Pls check now the PR

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