Skip to content

Python: Fix agent samples #11278

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

Merged
merged 4 commits into from
Apr 1, 2025

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Mar 30, 2025

Motivation and Context

This sample was throwing an error due to duplicating tool messages in the chat history.

Description

Fix a few agent samples.

Contribution Checklist

@TaoChenOSU TaoChenOSU added python Pull requests for the Python Semantic Kernel agents labels Mar 30, 2025
@TaoChenOSU TaoChenOSU self-assigned this Mar 30, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner March 30, 2025 15:55
@github-actions github-actions bot changed the title Fix agent samples Python: Fix agent samples Mar 30, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 30, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/autogen
   autogen_conversable_agent.py1171587%67, 73, 89, 91, 97–101, 279–280, 289–292
semantic_kernel/agents/chat_completion
   chat_completion_agent.py2042090%69, 79, 85, 101, 103, 109–113, 171, 174, 184, 192–197, 206, 361, 430, 496
TOTAL21246246988% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3339 5 💤 0 ❌ 0 🔥 1m 39s ⏱️

@TaoChenOSU TaoChenOSU enabled auto-merge April 1, 2025 15:27
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Apr 1, 2025
Merged via the queue into microsoft:main with commit 84f4841 Apr 1, 2025
28 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/simplify-math-plugin branch April 1, 2025 15:47
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Apr 1, 2025
eavanvalkenburg pushed a commit to eavanvalkenburg/semantic-kernel that referenced this pull request Apr 2, 2025
### 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.
-->
This
[sample](https://github.com/microsoft/semantic-kernel/blob/main/python/samples/concepts/agents/chat_completion_agent/chat_completion_agent_function_termination.py)
was throwing an error due to duplicating tool messages in the chat
history.

### Description

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

### 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 😄
glorious-beard pushed a commit to glorious-beard/semantic-kernel that referenced this pull request Apr 6, 2025
### 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.
-->
This
[sample](https://github.com/microsoft/semantic-kernel/blob/main/python/samples/concepts/agents/chat_completion_agent/chat_completion_agent_function_termination.py)
was throwing an error due to duplicating tool messages in the chat
history.

### Description

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

### 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 python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants