-
Notifications
You must be signed in to change notification settings - Fork 187
refactor!: OllamaChatGenerator
- refine reasoning support + refactoring
#2200
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
Conversation
OllamaChatGenerator
- refine reasoning support
...rations/ollama/src/haystack_integrations/components/generators/ollama/chat/chat_generator.py
Show resolved
Hide resolved
OllamaChatGenerator
- refine reasoning supportOllamaChatGenerator
- refine reasoning support + refactoring
content=content, | ||
meta=meta, | ||
index=index, | ||
finish_reason=finish_reason, | ||
component_info=component_info, | ||
tool_calls=tool_calls_list, |
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.
I realized we aren't utilizing the start
in StreamingChunk. Any reason for that?
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.
I see that we set start
in _handle_streaming_response
but only for tool_calls
. It should also be set to True for the beginnings of normal text blocks and I can't immediately tell if that's happening or not.
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.
I now set start
...rations/ollama/src/haystack_integrations/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.
Looks good!
Related Issues
Proposed Changes:
reasoning refinements
ChatMessage
content instead ofmeta
refactoring: since we remove reasoning from
meta
, this is breaking change and we need to release a major version, so I took the opportunity to do some refactoringorca-mini
is very outdated, whileqwen3:0.6b
is a small model, capable of tool calling and reasoningHow did you test it?
CI
I have manually verified and written tests for:
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.