semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Python: Update sessions python plugin to work with the correct endpoints

Open moonbox3 opened this issue 1 year ago • 1 comments

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.

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

Contribution Checklist

moonbox3 avatar Jul 02 '24 23:07 moonbox3

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/core_plugins/sessions_python_tool
   sessions_python_plugin.py1221092%116, 236–238, 270–272, 317–319
TOTAL651976388% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1558 1 :zzz: 0 :x: 0 :fire: 24.498s :stopwatch:

markwallace-microsoft avatar Jul 02 '24 23:07 markwallace-microsoft