-
Notifications
You must be signed in to change notification settings - Fork 5k
Add Sample Responses for Azure.AI.OpenAI #49799
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
base: main
Are you sure you want to change the base?
Add Sample Responses for Azure.AI.OpenAI #49799
Conversation
This commit introduces a new method `ResponseImage` in the `04_Responses.cs` file. The method demonstrates how to utilize the Azure OpenAI service to generate a response based on an image and a text prompt. It initializes an `AzureOpenAIClient`, creates input parts for both the image and text, and retrieves the response, which is then printed to the console.
Thank you for your contribution @v-cristhianh! We will review the pull request and get back to you soon. |
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.
Your account lacks the public GitHub organization memberships and permissions required of an internal contributor. Please review the Azure SDK onboarding documentation and use the associated Teams channel for support.
- Azure SDK onboarding (Microsoft internal)
- Azure SDK onboarding assistance (Microsoft internal)
You can verify the state of your account by running the Validate-AzsdkCodeOwner script from the Azure SDK tools repository.
API change check API changes are not detected in this pull request. |
Introduces a new test method `ResponseImageInput` in `ResponsesTests.cs`. This method verifies the functionality of sending an image and text prompt to the OpenAI API. It checks the response for output items and logs the input items asynchronously, enhancing the test coverage for image input handling.
82a6c7f
to
1069fb0
Compare
Introduced `ResponseSummarizeText` in `04_Responses.cs` to create a response based on a summarization prompt. This method utilizes an Azure OpenAI client to summarize a historical text about the Apollo 11 mission. A new private static method `GetSummarizationPromt` was also added to format the text for summarization. These changes enhance the code's functionality by enabling text summarization capabilities.
Introduced `ChatbotSummarizeTextTest` in `ResponsesTests.cs` to validate the summarization feature using the OpenAI response client. The test utilizes a predefined input about the Apollo 11 mission and includes a new private method `GetSummarizationPromt` to format the text for summarization. Assertions ensure the output is not null or empty.
Sample Responses and some Testing