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

Multiple tool calls not supported in streamed response #678

Closed
Finndersen opened this issue Jan 13, 2025 · 4 comments
Closed

Multiple tool calls not supported in streamed response #678

Finndersen opened this issue Jan 13, 2025 · 4 comments

Comments

@Finndersen
Copy link

It appears that currently only one tool call is supported for streaming responses. Is this a limitation of streamed responses vs standard complete responses?
Does this potentially mean that some tool calls will be ignored/discarded?

I'm not sure if this PR #468 addresses this issue or not

@Finndersen Finndersen changed the title Support multiple tool calls in streamed response Multiple tool calls not supported in streamed response Jan 14, 2025
@samuelcolvin
Copy link
Member

We need to support Structured Outputs, I think that's the only way to solve this, see #582.

@Finndersen
Copy link
Author

I'm not too familiar with the streamed response behaviour, but why is structured outputs relevant to this?

@samuelcolvin
Copy link
Member

because structured outputs make sure you only get one response, where as it's impossible to prevent the LLM from returning multiple tool calls, while only one can returned as the final result.

@Finndersen
Copy link
Author

I think the issue I was referring to is now resolved by the streaming refactor. I was referring to handling of multiple tool calls within the run, not as part of the final response

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