Skip to content

Python: Per deprecation message and date remove add_chat_message from AzureAIAgent and OpenAIAssistantAgent #11827

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

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

Per the deprecation message on the method add_chat_message(...) currently on the AzureAIAgent and OpenAIAssistantAgent classes, we are removing the method in favor of passing in any messages directly to the get_response(...), invoke(...) or invoke_stream(...). The underlying thread abstraction handles adding the messages to the thread as part of invocation.

Description

Remove the methods per the deprecation message and date.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner April 30, 2025 23:13
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Apr 30, 2025
@markwallace-microsoft
Copy link
Member

Python Unit Test Overview

Tests Skipped Failures Errors Time
3466 5 💤 0 ❌ 0 🔥 1m 45s ⏱️

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 2, 2025
Merged via the queue into microsoft:main with commit 89ef228 May 2, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel May 2, 2025
glorious-beard pushed a commit to glorious-beard/semantic-kernel that referenced this pull request May 6, 2025
… AzureAIAgent and OpenAIAssistantAgent (microsoft#11827)

### Motivation and Context

Per the deprecation message on the method `add_chat_message(...)`
currently on the `AzureAIAgent` and `OpenAIAssistantAgent` classes, we
are removing the method in favor of passing in any messages directly to
the `get_response(...)`, `invoke(...)` or `invoke_stream(...)`. The
underlying thread abstraction handles adding the messages to the thread
as part of invocation.

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

Remove the methods per the deprecation message and date.

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

Successfully merging this pull request may close these issues.

4 participants