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

.Net Agents - Fix interoperability of assistant generated content #7415

Merged
merged 8 commits into from
Jul 25, 2024

Conversation

crickman
Copy link
Contributor

@crickman crickman commented Jul 23, 2024

Motivation and Context

The OpenAIAssistantAgent produced messages that resulted in an exception when processed by the chat-completion service.

  • Code-Interpreter Output: Tool role implies preceeding function-call
  • FileReferenceContent: Image output being isolated from accompanying text

Fixed: #7414

Description

  • Changed role of code-interpreter output to assistant
  • Merged message-content into a single ChatMessageContent object

Contribution Checklist

@crickman crickman added bug Something isn't working .NET Issue or Pull requests regarding .NET code experimental Associated with an experimental feature agents labels Jul 23, 2024
@crickman crickman requested review from alliscode and moonbox3 July 23, 2024 20:06
@crickman crickman self-assigned this Jul 23, 2024
@crickman crickman requested a review from a team as a code owner July 23, 2024 20:06
@crickman crickman added the PR: ready for review All feedback addressed, ready for reviews label Jul 23, 2024
@crickman crickman added this pull request to the merge queue Jul 25, 2024
Merged via the queue into main with commit 5c7f9ba Jul 25, 2024
15 checks passed
@crickman crickman deleted the fix_assistant_content branch July 25, 2024 16:09
@crickman crickman removed the PR: ready for review All feedback addressed, ready for reviews label Aug 5, 2024
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
…crosoft#7415)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
The `OpenAIAssistantAgent` produced messages that resulted in an
exception when processed by the chat-completion service.
- Code-Interpreter Output: `Tool` role implies preceeding function-call
- `FileReferenceContent`: Image output being isolated from accompanying
text

Fixed: microsoft#7414

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

- Changed role of code-interpreter output to `assistant`
- Merged message-content into a single `ChatMessageContent` object

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents bug Something isn't working experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

.Net Agents: ChatCompletion exception processing assistant generate content
3 participants