Skip to content

Python: intro allowed content types in chat history channel receive. Add mixed chat image sample. - #10347

Merged
Evan Mattson (moonbox3) merged 6 commits into
microsoft:mainfrom
moonbox3:py-assistant-file-ref-content-fix
Jan 30, 2025
Merged

Evan Mattson (moonbox3) merged 6 commits into
microsoft:mainfrom
moonbox3:py-assistant-file-ref-content-fix

Conversation

@moonbox3

Copy link
Copy Markdown
Collaborator

Motivation and Context

During a group chat, any file reference content created by an assistant agent, doesn't need to be communicated to a chat completion agent. Filter these types out and only include other types, like text, if available.

Description

This PR:

Contribution Checklist

@moonbox3
Evan Mattson (moonbox3) requested a review from a team as a code owner January 30, 2025 07:51
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added python Pull requests for the Python Semantic Kernel documentation labels Jan 30, 2025
@markwallace-microsoft

Mark Wallace (markwallace-microsoft) commented Jan 30, 2025 •

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/channels
   chat_history_channel.py79297%167, 170
TOTAL17094186189% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3048 4 💤 0 ❌ 0 🔥 1m 21s ⏱️

@moonbox3 Evan Mattson (moonbox3) changed the title Python: Don't include file ref content in chat history channel receive. Add mixed chat image sample. Python: intro allowed content types in chat history channel receive. Add mixed chat image sample. Jan 30, 2025
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Jan 30, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 30, 2025
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Jan 30, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 30, 2025
@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Jan 30, 2025
Merged via the queue into microsoft:main with commit 605db09 Jan 30, 2025
@moonbox3
Evan Mattson (moonbox3) deleted the py-assistant-file-ref-content-fix branch January 30, 2025 23:46
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
…Add mixed chat image sample. (microsoft#10347)

### Motivation and Context

During a group chat, any file reference content created by an assistant
agent, doesn't need to be communicated to a chat completion agent.
Filter these types out and only include other types, like text, if
available.

<!-- 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.
-->

### Description

This PR:
- Adds a mixed chat image sample to have an assistant agent generate an
image, along with text, and call the chat completion agent successfully
with only the allowed types (like text).
- Adds a unit test to exercise the same behavior.
- Closes microsoft#10317

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

### 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 documentation python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Python: AzureChatCompletion service fails with "Missing required parameter" error

4 participants