Skip to content

Python: Fix Chat History Agent format instructions regression. #10512

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 3 commits into from
Feb 13, 2025

Conversation

moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Feb 12, 2025

Motivation and Context

The chat history agent templating was inadvertently broken. This PR restores the functionality to be able to use templating with a Chat Completion Agent.

Description

Fix the templating for a Chat Completion Agent. Add unit tests for more coverage.

  • Fix a unit test fixture that was annotated to return an AsyncMock, but it's actually returning an async generator function.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner February 12, 2025 22:30
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Feb 12, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 12, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/azure_ai
   agent_content_generation.py1452086%68–71, 89, 91, 286, 338–370
   agent_thread_actions.py33812862%139, 141, 176–179, 364, 366, 405–406, 432, 435–439, 442–454, 457–488, 494–501, 504–517, 533–564, 608, 637–671, 734, 739–744, 764–771, 802–811, 854–864
semantic_kernel/agents/bedrock
   bedrock_agent.py1843382%106, 120, 124, 126, 173–186, 252, 276, 293, 325, 360–363, 366, 369, 371, 403, 420–421, 423–424, 466, 477–478, 490, 526–537, 548, 565–578
semantic_kernel/agents/chat_completion
   chat_completion_agent.py110794%82, 85, 94–99, 124, 192
semantic_kernel/agents/group_chat
   agent_chat.py125298%80, 173
   agent_group_chat.py1151389%73, 163, 213, 217–228
semantic_kernel/agents/open_ai
   assistant_content_generation.py1591292%94–97, 115, 118–119, 351–359, 405
   open_ai_assistant_base.py5281497%195, 204–209, 289, 305–306, 774, 828, 1035, 1043, 1113, 1128, 1192
TOTAL18774223088% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3198 5 💤 0 ❌ 0 🔥 2m 9s ⏱️

@moonbox3 moonbox3 enabled auto-merge February 13, 2025 02:32
@moonbox3 moonbox3 disabled auto-merge February 13, 2025 07:29
Copy link
Contributor Author

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will push some pending changes soon - typing improvements.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 13, 2025
@eavanvalkenburg eavanvalkenburg removed this pull request from the merge queue due to a manual request Feb 13, 2025
Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of nits

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 13, 2025
Merged via the queue into microsoft:main with commit 784f13e Feb 13, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants