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

add tolerance for empty choices #4311

Merged

Conversation

MohMaz
Copy link
Contributor

@MohMaz MohMaz commented Nov 22, 2024

Why are these changes needed?

I encountered this issue only in AzureOpenAIChatCompletionClient, adding some tolerance for empty choices ! Not a super clean fix ... just works to unblock updating streaming samples using AzureOpenAIChatCompletionClient

Related issue number

closes #4213

Checks

Signed-off-by: Mohammad Mazraeh <[email protected]>
@MohMaz MohMaz self-assigned this Nov 22, 2024
@MohMaz MohMaz requested a review from jackgerrits November 22, 2024 07:54
@MohMaz MohMaz marked this pull request as ready for review November 22, 2024 07:54
@MohMaz MohMaz requested a review from rysweet November 22, 2024 18:17
@MohMaz MohMaz requested a review from jackgerrits November 23, 2024 19:56
@MohMaz MohMaz requested a review from jackgerrits November 25, 2024 03:00
@jackgerrits jackgerrits merged commit 341417e into microsoft:main Nov 25, 2024
41 checks passed
@jspv
Copy link
Contributor

jspv commented Dec 4, 2024

Can we extend the fix to be an argument or property to the AzureOpenAIChatCompletionClient object rather than an argument to create() and create_stream() and have create() and create_stream() check the object? This way Agents who call create() and create_stream() don't need to also be changed to implement this fix, the parameter can be set when instantiating the model client and then passed to the agent via model_client= when the Agent is instantiated.

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

Successfully merging this pull request may close these issues.

finish_reason not set in AzureOpenAIChatCompletionClient.create_stream
4 participants