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

Graduate Content Types #5625

Closed
3 of 8 tasks
markwallace-microsoft opened this issue Mar 25, 2024 · 0 comments · Fixed by #6319
Closed
3 of 8 tasks

Graduate Content Types #5625

markwallace-microsoft opened this issue Mar 25, 2024 · 0 comments · Fixed by #6319
Assignees
Labels
sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 25, 2024

Checklist to be completed when graduating an experimental feature

  • Verify the Content Types functionality is complete (Matthew to provide requirements)
  • ​Verify API docs are complete and arrange to have them published
  • Make appropriate updates to Learn docs​
  • Make appropriate updates to Samples​​
  • Verify there are no serious open Issues​​
  • Verify there are sample implementations​ for the main use cases
  • Update table in EXPERIMENTS.md
  • Remove SKEXP​ flag from Content Types code
@matthewbolanos matthewbolanos self-assigned this Mar 26, 2024
@matthewbolanos matthewbolanos added sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) and removed triage labels Mar 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 10, 2024
### Motivation and Context

⚠️ Breaking changes on non-experimental types **ImageContent**

Resolves #5625
Resolves #5295

For a brief time this changes will keep the content below as
experimental.

- BinaryContent
- AudioContent
- ImageContent 
- FunctionCallContent
- FunctionResultContent

Changes:

### **BinaryContent** 
- Removed providers for lazy loading content, simplifying its usage and
APIs.
- Removed `Stream` constructor to avoid IDisposable resource consumption
or bad practices.
- Added `Uri` dedicated for Referenced Uri information
- Added `DataUri` property which can be set or get dynamically (auto
generated if you created the
content using byte array with a mime type) 
Setting a `DataUri` will automatically update the `MimeType` property
and add any extra metadata that may be available in the data scheme
definition.
- Added a required `mimeType` property to the ByteArray constructor, to
encourage passing the mimeType when creating BinaryContent directly or
from specializations.
- Added `Data` property which can be set or get dynamically (auto
generated if you created the content using a data uri format)
Setting a Data on an existing BinaryContent will also reflect on the
getter of `DataUri` for the given content.
- Added DataUri and Base64 validation when setting DataUri on the
contents.
- When using DataUri parameters those merge with the current content
metadata.
i.e:
`data:image/jpeg;parameter1=value1;parameter2=value2;base64,binary==`

### ⚠️ **ImageContent** Fixes bugs and inconsistency behavior:
- Setting the Data of an image doesn't change the current data uri and
vice versa, allowing the sema image content instance to have different
binary data to representations.
- When an Image could not have DataUri and Uri in the same instance,
this limits scenarios where you have the image data but want to have a
reference to where that content is from.
- Wasn't possible to create an Image from a data uri greater than the
size limit of .Net System.Uri type here:

[dotnet/runtime#96544.

### **FunctionResultContent**
- Update `Id` property to `CallId`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants