-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: support for tools in OllamaChatGenerator
#106
Conversation
0c5f103
to
9ae65a0
Compare
Pull Request Test Coverage Report for Build 11144705556Details
💛 - Coveralls |
haystack_experimental/components/generators/ollama/chat/chat_generator.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anakin87 I did only a rough pass first to provide some feedback, hopefully useful :-) I'll do another after this one.
haystack_experimental/components/generators/ollama/chat/chat_generator.py
Show resolved
Hide resolved
haystack_experimental/components/generators/ollama/chat/chat_generator.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me, small suggestions here and there. Let's see what @shadeMe says as well
Related Issues
Proposed Changes:
I'm adding support for tools in
OllamaChatGenerator
. Similar to OpenAI PR #57.I'm trying to respect a balance between introducing new things and being compatible with existing code.
How did you test it?
CI, new tests.
Notes for the reviewer
I manually tested the Chat Generator using our notebook.
The implementation generally works well.
The simple use case and processing tool results with the Chat Generator are fully reproducible.
Reproducing the multi-tool chat application (with human in the loop) is not always stable with
llama3.2:3b
/llama3.1:8b
.The model tends to produce tool calls (even if not needed) and sometimes hallucinates tools.
Also, Ollama support for tools is not fully polished yet. (ollama/ollama#6127)
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.