Skip to content
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

Mixing streaming and tool use #123

Open
efritz opened this issue Jul 30, 2024 · 1 comment
Open

Mixing streaming and tool use #123

efritz opened this issue Jul 30, 2024 · 1 comment

Comments

@efritz
Copy link

efritz commented Jul 30, 2024

When I enable streaming it seems that the tool use JSON payload is sent as part of the content field of the ChatResponse value and tool_calls remains empty. Disabling streaming for the same model/prompt populates this array as I'd expect.

Is there a way to enable the same parsing with streaming enabled (or, alternatively a guide on how to consistently parse a tool use from the streaming model response)?

@BruceMacD
Copy link
Collaborator

BruceMacD commented Jul 30, 2024

Hey @efritz, this is a limitation on tool use with the latest version of Ollama. There is a fix open in the main repository now:
ollama/ollama#6066

I'll keep this issue open to track when this gets merged into the JavaScript SDK.

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

No branches or pull requests

2 participants