Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: Agent content generation for function call content should be …
…assistant role (#10096) ### Motivation and Context The (Azure)OpenAIAssistant content generation for function call content was specifying the tool role instead of an assistant role. This was causing an issue in the `.to_dict()` method in `chat_message_content` because a `TOOL` role should only have `FunctionResultContent`. <!-- 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 fixes the AuthorRole to be ASSISTANT instead of TOOL for function call content, which matches how it's handled in the chat completion case. - Adds a specific unit test for test coverage (previous test coverage was indirect and didn't catch this) - Closes #10075 <!-- 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 😄
- Loading branch information