-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix (Ollama provider): Unsupported operation: streaming not implemented #4303
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
|
Looks like this may fix this one: #4308 |
DOsinga
left a comment
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.
thanks!
crates/goose/src/providers/ollama.rs
Outdated
| let config = crate::config::Config::global(); | ||
| let goose_mode = config.get_param("GOOSE_MODE").unwrap_or("auto".to_string()); | ||
| let filtered_tools = if goose_mode == "chat" { &[] } else { tools }; | ||
|
|
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.
this seems unexpected. by the time we get here, we should have already have filtered the tools. do we really need this?
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.
yeah I don't think so, not sure where that came from
|
thanks @Jovonni - that works once I patched it up: #4364 - if you want, you can pull that change in to this branch and I can approve/merge, or we can shift over to there, has your commits. can you also sign the DCO: https://github.com/block/goose/pull/4303/checks?check_run_id=48963447829 so we can get past that you can Nice first contrib, this feels a lot nicer with ollama now it can stream. |
|
just signed dco @michaelneale sorry for the delay, have been heads down on my side. |
|
@michaelneale I also just cherry picked your work (from #4364) as you mentioned above. Glad to hear this was useful!! 🚀 🫡 |
Signed-off-by: jovonni <[email protected]>
Signed-off-by: jovonni <[email protected]>
| yield (message, usage); | ||
| } | ||
| })) | ||
| } |
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.
left this comment in the other PR too - this looks very similar to the openai implementation. can we extract this and reuse?
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.
@DOsinga yeah good idea - I am not familiar with the pattern on how to reuse parts of another provider, can ollama just be openai provider with some customisation? what is another examplar to follow (this is an older provider so may have some jank/special cases)
|
@Jovonni if you get a chance to consider the comment above - if there is a way we can re-use the openai streaming would be nice, I may get a chance later today or tomorrow to look, but if not, we can probably merge this soon |
* main: new recipe to lint-check my code (#4416) removing a leftover syntax error (#4415) Iand/updating recipe validation workflow (#4413) Iand/updating recipe validation workflow (#4410) Fix (Ollama provider): Unsupported operation: streaming not implemented (#4303) change databricks default to claude sonnet 4 (#4405) Iand/updating recipe validation workflow (#4406) Add metrics for recipe metadata in scheduler, UI, and CLI (#4399) Iand/updating recipe validation workflow (#4403) making small updates to recipe validation workflow (#4401) Automate OpenRouter API Key Distribution for External Recipe Contributors (#3198) Enhance `convert_path_with_tilde_expansion` to handle Windows (#4390) make sure all cookbook recipes have a title and version, but no id (#4395) Nest TODO State in session data (#4361) Fast model falls back to regular (#4375) Update windows instructions (#4333)
* main: (40 commits) new recipe to lint-check my code (#4416) removing a leftover syntax error (#4415) Iand/updating recipe validation workflow (#4413) Iand/updating recipe validation workflow (#4410) Fix (Ollama provider): Unsupported operation: streaming not implemented (#4303) change databricks default to claude sonnet 4 (#4405) Iand/updating recipe validation workflow (#4406) Add metrics for recipe metadata in scheduler, UI, and CLI (#4399) Iand/updating recipe validation workflow (#4403) making small updates to recipe validation workflow (#4401) Automate OpenRouter API Key Distribution for External Recipe Contributors (#3198) Enhance `convert_path_with_tilde_expansion` to handle Windows (#4390) make sure all cookbook recipes have a title and version, but no id (#4395) Nest TODO State in session data (#4361) Fast model falls back to regular (#4375) Update windows instructions (#4333) feat: linux computer control for android (termux) (#3890) feat: Added scroll state support for chat-session-list navigation (#4360) docs: typo fix (#4376) blog: goose janitor (#4131) ...
…tensions-on-resume * upstream/main: (60 commits) [cookbook recipe] Update Wording (block#4438) feat: show enabled extensions at top of extensions page (block#4423) test recipe (block#4436) Extensions loading indicator on desktop launch (block#4412) removing trailing slash (block#4433) [recipe cookbook] test recipe (block#4431) [recipe cookbook] switching to SHA (block#4429) [recipe cookbook] Update url build (block#4427) [Recipe Cookbook] test recipe flow (block#4426) [Recipe cookbook] Addressing GitHub api format issue (block#4424) feat: integrate tool call icons with status indicators and daisy chaining (block#4279) new recipe to lint-check my code (block#4416) removing a leftover syntax error (block#4415) Iand/updating recipe validation workflow (block#4413) Iand/updating recipe validation workflow (block#4410) Fix (Ollama provider): Unsupported operation: streaming not implemented (block#4303) change databricks default to claude sonnet 4 (block#4405) Iand/updating recipe validation workflow (block#4406) Add metrics for recipe metadata in scheduler, UI, and CLI (block#4399) Iand/updating recipe validation workflow (block#4403) ...
…ed (#4303) Signed-off-by: jovonni <[email protected]> Co-authored-by: Michael Neale <[email protected]>
I'm not entirely sure if this is the right way to fix this issue, but here's what I ran into when using the goose desktop app installed from the site (
v1.6.0):implements streaming capability for ollama chat completions by:
note