SessionsPythonREPLTool
tool uses DefaultAzureCredential
to authenticate with Azure. Locally, it’ll use your credentials from the Azure CLI or VS Code. Install the Azure CLI and log in with az login
to authenticate.
To use the code interpreter you’ll also need to create a session pool, which you can do by following the instructions here. Once that’s done you should have a pool management session endpoint, which you’ll need to set below:
langchain-azure-dynamic-sessions
package:
execute()
method:
upload_file()
functionality to upload data to our session. You can upload data either via the data: BinaryIO
arg or via the local_file_path: str
arg (which points to a local file on your system). The data is automatically uploaded to the “/mnt/data/” directory in the sessions container. You can get the full file path via the upload metadata returned by upload_file()
.