-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
.Net: Improve the ITextToImageService
abstractions to support ExecutionSettings
#8068
Merged
RogerBarreto
merged 27 commits into
microsoft:main
from
RogerBarreto:issues/5657-itexttoimage-update
Oct 1, 2024
Merged
.Net: Improve the ITextToImageService
abstractions to support ExecutionSettings
#8068
RogerBarreto
merged 27 commits into
microsoft:main
from
RogerBarreto:issues/5657-itexttoimage-update
Oct 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
RogerBarreto
commented
Aug 12, 2024
•
edited
Loading
edited
- Resolves .Net ITextToImageService not following other service modalities standards #5657
- Resolves .Net: Add support for image quality, style, and detail level #7086
- Resolves .Net: Support images as bytes by {Azure}OpenAI text to image services #7088
…Content and TextContent
markwallace-microsoft
added
.NET
Issue or Pull requests regarding .NET code
kernel
Issues or pull requests impacting the core kernel
kernel.core
labels
Aug 12, 2024
- Added the GetImageContentsAsync method to the OpenAITextToImageService class. - Implemented validation for input, including width, height, quality, and style settings. - Supported image sizes include 256x256, 512x512, 1024x1024, 1792x1024, and 1024x1792. - Added checks for supported qualities ('standard', 'hd') and styles ('vivid', 'natural'). - Constructed the request body for image generation and processed the response to handle both URLs and base64-encoded images. - Converted image strings into ImageContent objects, ensuring proper handling of data URIs and HTTP URLs.
- Implemented unit tests for the GetImageContentsAsync method in OpenAITextToImageService. - Added a test to verify that the method returns expected ImageContent when provided with valid input. - Added parameterized tests using [Theory] and [InlineData] to cover a variety of scenarios: - Valid URL and base64 image data inputs. - Validation of input sizes, quality, and style parameters. - Ensured NotSupportedException is thrown for unsupported sizes, quality, and style. - Tests ensure that both HTTP URLs and base64-encoded images are handled correctly, with proper assertions on the returned ImageContent objects.
.NET Add Style and Quality Parameters Support with Execution Settings
Hi @RogerBarreto , do we know when this might get merged to main? |
WeihanLi
reviewed
Aug 28, 2024
dotnet/src/Connectors/Connectors.OpenAI/TextToImage/OpenAITextToImageExecutionSettings.cs
Outdated
Show resolved
Hide resolved
@aghimir3 Working to have this one in next weeks. |
…nto issues/5657-itexttoimage-update
RogerBarreto
had a problem deploying
to
integration
September 13, 2024 17:28
— with
GitHub Actions
Error
RogerBarreto
had a problem deploying
to
integration
September 13, 2024 17:32
— with
GitHub Actions
Failure
RogerBarreto
temporarily deployed
to
integration
September 16, 2024 08:49
— with
GitHub Actions
Inactive
RogerBarreto
changed the title
.Net: [WIP] Improving the
.Net: Improve the Sep 16, 2024
ITextToImageService
abstractions to support ExecutionSettings
ITextToImageService
abstractions to support ExecutionSettings
RogerBarreto
temporarily deployed
to
integration
September 16, 2024 09:01
— with
GitHub Actions
Inactive
SergeyMenshykh
approved these changes
Sep 16, 2024
dotnet/src/Connectors/Connectors.AzureOpenAI/Services/AzureOpenAITextToImageService.cs
Outdated
Show resolved
Hide resolved
dmytrostruk
reviewed
Sep 16, 2024
dotnet/src/Connectors/Connectors.OpenAI/Connectors.OpenAI.csproj
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextToImage/ITextToImageService.cs
Show resolved
Hide resolved
RogerBarreto
temporarily deployed
to
integration
September 20, 2024 10:33
— with
GitHub Actions
Inactive
RogerBarreto
had a problem deploying
to
integration
September 23, 2024 17:31
— with
GitHub Actions
Failure
RogerBarreto
had a problem deploying
to
integration
September 23, 2024 17:38
— with
GitHub Actions
Failure
RogerBarreto
had a problem deploying
to
integration
September 24, 2024 07:01
— with
GitHub Actions
Failure
RogerBarreto
had a problem deploying
to
integration
September 24, 2024 07:25
— with
GitHub Actions
Failure
RogerBarreto
temporarily deployed
to
integration
September 24, 2024 09:38
— with
GitHub Actions
Inactive
…nto issues/5657-itexttoimage-update
RogerBarreto
temporarily deployed
to
integration
September 27, 2024 12:59
— with
GitHub Actions
Inactive
RogerBarreto
temporarily deployed
to
integration
September 27, 2024 15:13
— with
GitHub Actions
Inactive
dotnet/src/Connectors/Connectors.AzureOpenAI/Core/AzureClientCore.TextToImage.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.AzureOpenAI/CompatibilitySuppressions.xml
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.OpenAI/Core/OpenAITextToImageExecutionSettingsConverter.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToImageExecutionSettings.cs
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToImageExecutionSettings.cs
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToImageExecutionSettings.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextToImage/ITextToImageService.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextToImage/TextToImageServiceExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/AI/TextToImage/TextToImageServiceExtensions.cs
Outdated
Show resolved
Hide resolved
RogerBarreto
temporarily deployed
to
integration
September 30, 2024 13:15
— with
GitHub Actions
Inactive
RogerBarreto
had a problem deploying
to
integration
September 30, 2024 14:52
— with
GitHub Actions
Error
RogerBarreto
temporarily deployed
to
integration
September 30, 2024 14:53
— with
GitHub Actions
Inactive
markwallace-microsoft
approved these changes
Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kernel.core
kernel
Issues or pull requests impacting the core kernel
.NET
Issue or Pull requests regarding .NET code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.