Skip to content

Add Azure Responses Content Image sample with image url and image base64 #44818

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

waltervvb
Copy link

@waltervvb waltervvb commented Mar 28, 2025

Description

Add two samples for the Responses interface to generate model responses using image inputs.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. OpenAI labels Mar 28, 2025
Copy link
Contributor

Thank you for your contribution @waltervvb! We will review the pull request and get back to you soon.

@waltervvb waltervvb marked this pull request as draft March 28, 2025 15:26
Copy link
Member

@jpalvarezl jpalvarezl left a comment

Choose a reason for hiding this comment

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

This looks really good. I think it has a couple of formatting issues here and there, but it's almost ready! Thank you.

ResponsesResponse response = client.createResponse(request);
assertImageResponseForAzure(response);
}

Copy link
Member

Choose a reason for hiding this comment

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

Both tests are great! Once we've locked down on the implementation we will need to write the async version and the NonAzure versions too.

Copy link
Author

Choose a reason for hiding this comment

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

NonAzure and Async Versions added

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@waltervvb waltervvb requested a review from jpalvarezl April 8, 2025 15:04
@@ -31,7 +31,7 @@ static Stream<Arguments> getTestParametersResponses() {
}

private static boolean supportsResponses(AzureResponsesServiceVersion serviceVersion) {
return AzureResponsesServiceVersion.V2024_12_01_PREVIEW.equals(serviceVersion);
return AzureResponsesServiceVersion.V2025_03_01_PREVIEW.equals(serviceVersion);
Copy link
Member

Choose a reason for hiding this comment

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

I am currious, was this change necessary?

Copy link
Author

Choose a reason for hiding this comment

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

I was receiving this message "Azure OpenAI Responses API is enabled only for api-version 2025-03-01-preview and later"

@waltervvb
Copy link
Author

@microsoft-github-policy-service agree company="Aditi Consulting LLC"

@waltervvb
Copy link
Author

@waltervvb please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Aditi Consulting LLC"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. OpenAI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants