Skip to content

fix(closes OPEN-8856): azure OpenAI tracer not working when chunks ha…#589

Open
gustavocidornelas wants to merge 1 commit intomainfrom
cid/openai-choices-fix
Open

fix(closes OPEN-8856): azure OpenAI tracer not working when chunks ha…#589
gustavocidornelas wants to merge 1 commit intomainfrom
cid/openai-choices-fix

Conversation

@gustavocidornelas
Copy link
Contributor

…ve no 'choices'

Pull Request

Summary

Gracefully handle OpenAI responses with empty choices. Also fixes JSON serialization issue for tool calls without arguments.

Changes

  • Check if chunk has choices and yield accordingly.
  • try/except` block for tool calls without arguments to avoid serialization issue.

Context

OPEN-8856: Azure OpenAI tracer not working when chunks have no choices

Testing

  • Manual testing

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.

1 participant