-
Notifications
You must be signed in to change notification settings - Fork 839
Fix GenerateImagesAsync_SingleImageGeneration integration test #6843
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
Conversation
Both DataContent and UriContent are valid in responses, and from both OpenAI and Azure OpenAI, I get back a UriContent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an integration test for image generation that was incorrectly expecting only DataContent responses. The test now handles both DataContent and UriContent response types, which are both valid formats returned by OpenAI and Azure OpenAI services.
Key Changes
- Updated test assertions to accept both DataContent and UriContent response types
- Replaced type-specific assertions with a switch statement to handle different content types
- Added appropriate validation for each content type (URI scheme validation for UriContent, data validation for DataContent)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Both DataContent and UriContent are valid in responses, and from both OpenAI and Azure OpenAI, I get back a UriContent.
Microsoft Reviewers: Open in CodeFlow