We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Based on this document, I can use streaming_callback as argument in OllamaChatGenerator.
streaming_callback
My code:
from haystack.dataclasses import ChatMessage from haystack_integrations.components.generators.ollama import OllamaChatGenerator from haystack.components.generators.utils import print_streaming_chunk generator = OllamaChatGenerator(model="phi3", url = "http://localhost:11434/api/chat", streaming_callback = print_streaming_chunk, generation_kwargs={ "num_predict": 100, "temperature": 0.9, }, ) messages = [ChatMessage.from_system("\nYou are a helpful, respectful and honest assistant"), ChatMessage.from_user("What's Natural Language Processing?")] print(generator.run(messages=messages))
But it return error
Error message
TypeError: OllamaChatGenerator.init() got an unexpected keyword argument 'streaming_callback'
System:
The text was updated successfully, but these errors were encountered:
Hello!
I have tried your code with the latest version of ollama-haystack (0.0.7) and works for me.
ollama-haystack
Please try reinstalling the latest version (pip install -U ollama-haystack) and let us know.
pip install -U ollama-haystack
Sorry, something went wrong.
Hi @anakin87, Thanks for your fast and correct reply.
No branches or pull requests
Describe the bug
Based on this document, I can use
streaming_callback
as argument in OllamaChatGenerator.My code:
But it return error
Error message
TypeError: OllamaChatGenerator.init() got an unexpected keyword argument 'streaming_callback'
System:
The text was updated successfully, but these errors were encountered: