Skip to content
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

Add Azure Dall-E #1209

Merged
merged 33 commits into from
Jun 9, 2023
Merged

Add Azure Dall-E #1209

merged 33 commits into from
Jun 9, 2023

Conversation

xbotter
Copy link
Contributor

@xbotter xbotter commented May 25, 2023

Motivation and Context

Implement Azure OpenAI Dall E

Description

Implement Azure OpenAI Image Generation according to the official documentation and the examples provided by Azure OpenAI Studio, so that it can be used in SK.

Due to the differences between the API of Azure OpenAI Dall-E and OpenAI Dall-E, some modifications have been made to OpenAIClientBase under CustomClient to ensure compatibility.

Contribution Checklist

@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel samples labels May 25, 2023
Copy link
Member

@lemillermicrosoft lemillermicrosoft left a comment

Choose a reason for hiding this comment

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

Tested locally. Batch of formatting comments.

Copy link
Member

@lemillermicrosoft lemillermicrosoft left a comment

Choose a reason for hiding this comment

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

Tested locally. Batch of formatting comments.

Add some newlines to follow formatting guidelines.
Copy link
Member

@lemillermicrosoft lemillermicrosoft left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the PR.

@lemillermicrosoft lemillermicrosoft added PR: ready for review All feedback addressed, ready for reviews PR: ready to merge PR has been approved by all reviewers, and is ready to merge. labels May 31, 2023
shawncal and others added 2 commits June 1, 2023 01:40
Co-authored-by: Lee Miller <lemiller@microsoft.com>
fix:  add maximum retry limit to prevent infinite looping.
@xbotter
Copy link
Contributor Author

xbotter commented Jun 2, 2023

I tried to add some limitations on the maximum number of retries to avoid falling into an infinite loop.

While making improvements, I noticed that there have been some updates to the Azure Dall-E API version, so I also took the opportunity to update it.

Please review again. @dmytrostruk

@xbotter xbotter requested a review from dmytrostruk June 2, 2023 06:13
@xbotter xbotter requested a review from dmytrostruk June 3, 2023 03:13
@xbotter
Copy link
Contributor Author

xbotter commented Jun 8, 2023

@SergeyMenshykh Thanks for your suggestion. I have updated the implementation method according to the document, and it now appears much clearer.

If there is anything that needs to be adjusted, please let me know.

@lemillermicrosoft lemillermicrosoft enabled auto-merge (squash) June 9, 2023 15:08
@lemillermicrosoft lemillermicrosoft merged commit 471ec9c into microsoft:main Jun 9, 2023
15 checks passed
shawncal added a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### Motivation and Context

Implement Azure OpenAI Dall E

### Description
Implement Azure OpenAI Image Generation according to the official
[documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#image-generation)
and the examples provided by Azure OpenAI Studio, so that it can be used
in SK.

Due to the differences between the API of Azure OpenAI Dall-E and OpenAI
Dall-E, some modifications have been made to OpenAIClientBase under
CustomClient to ensure compatibility.

Co-authored-by: Lee Miller <lemiller@microsoft.com>
Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews PR: ready to merge PR has been approved by all reviewers, and is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants