-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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: Removing dependency on BinaryData class from content classes #5229
.Net: Removing dependency on BinaryData class from content classes #5229
Conversation
dotnet/src/SemanticKernel.Abstractions/Contents/AudioContent.cs
Outdated
Show resolved
Hide resolved
@SergeyMenshykh So you need also remove BinaryData from imagecontent class. |
Right, the plan is to have a PR per type. So, there will be at least two more PRs - one for ImageContent, and the other one for BinaryContent. I updated the PR description to make it clear. |
Actually, it appears that the PR per class will be too excessive, so I'll push all the changes as one PR. |
2. Dependency on the System.Memory.Data package is removed
dotnet/src/SemanticKernel.Abstractions/Contents/ImageContent.cs
Outdated
Show resolved
Hide resolved
2. MediaType made optional for ImageContent to align with AudioContent and avaid breaking change
…geyMenshykh/semantic-kernel into remove-binarydata-dependency
…ting properties directly without initiating them through constructors.
…geyMenshykh/semantic-kernel into remove-binarydata-dependency
dotnet/src/Connectors/Connectors.OpenAI/AzureSdk/AzureOpenAITextToAudioClient.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Connectors/Connectors.OpenAI/AzureSdk/OpenAITextToAudioClient.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/Contents/AudioContent.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
…geyMenshykh/semantic-kernel into remove-binarydata-dependency
Motivation and Context
Today, SemanticKernel.Abstractions package has unnecessary dependency on System.Memory.Data package which according to this issue #5226 should be removed to minimize number of dependencies and keep only absolutely necessary ones.
Description
This PR replaces the usage of the System.Memory.Data.BinaryData type with ReadonlyMemory in the AudioContent, BinaryContent, and ImageContent classes. It also removes the dependency of SemanticKernel.Abstractions on the System.Memory.Data package.
Contribution Checklist