mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 11:19:56 +00:00
### Motivation and Context The Sessions Python Plugin was working properly, but some users reported that the endpoints needed updating. We had made previous updates to the plugin, but they didn't account for the update API endpoints and request body changes shown [here](https://learn.microsoft.com/en-us/azure/container-apps/sessions-code-interpreter). <!-- 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 updates the plugin tool to work with the documented endpoints and request bodies. The unit tests were also updated. The concept sample for the Azure Python sessions plugin was tested with all methods to: execute code, upload multiple files, list files, and download them. - Additionally, improve error handling for each of the function calls so the proper error message is surfaced to the user via SK exceptions. - Fix path building and making sure the sessions endpoint is converted to a string from the Pydantic https type. - Closes #6934 <!-- 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 - [ ] I didn't break anyone 😄