You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Support BinaryContent in OpenAI Connector (#11644)
### Motivation and Context
The OpenAI Connector only supports `TextContent`, `ImageContent`, and
`AudioContent` KernelContent types. However, the Chat Completion API
supports uploading other file types encoded as a base64 string. This
change leverages that behavior to add support for `BinaryContent`.
### Description
This change adds support for `BinaryContent` KernelContent types by
using `ChatMessageContentPart.CreateFilePart` to create the
corresponding `ChatMessageContentPart`.
### Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
---------
Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
0 commit comments