Skip to content

Conversation

@DanieleMorotti
Copy link
Contributor

In response to issue #587 , I implemented a solution to first check if refusal and usage attributes exist in the delta object.

I added a unit test similar to test_openai_chatcompletions_stream.py.

Let me know if I should change something.

Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome thank you!

@rm-openai
Copy link
Collaborator

Ah @DanieleMorotti you'll need to move the test into tests/models/

@devv-shayan
Copy link

was working on :) but thanks @DanieleMorotti

@rm-openai rm-openai merged commit e11b822 into openai:main Apr 24, 2025
5 checks passed
@DanieleMorotti DanieleMorotti deleted the fix_litellm_stream branch April 24, 2025 17:06
bonk1t pushed a commit to vrsen-ai-solutions/openai-agents-python that referenced this pull request May 7, 2025
In response to issue openai#587 , I implemented a solution to first check if `refusal` and `usage` attributes exist in the `delta` object. I added a unit test similar to `test_openai_chatcompletions_stream.py`. Let me know if I should change something. --------- Co-authored-by: Rohan Mehta <rm@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants