Class: AzureDynamicSessionTool
Azure Code Interpreter tool: A tool that allows you to interact with a dynamic session on Azure.
Implements
BaseTool
<AzureDynamicSessionToolParams
>
Constructors
new AzureDynamicSessionTool()
new AzureDynamicSessionTool(
params
?):AzureDynamicSessionTool
Parameters
• params?: AzureDynamicSessionToolParams
Returns
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:189
Properties
metadata
metadata:
ToolMetadata
The metadata for the tool.
Implementation of
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:170
Methods
_buildUrl()
_buildUrl(
path
):string
Parameters
• path: string
Returns
string
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:205
call()
call(
code
):Promise
<InterpreterToolOutput
>
This tool is used to execute python commands when you need to perform calculations or computations in a Session. Input should be a valid python command. The tool returns the result, stdout, and stderr.
Parameters
• code: Pick
<AzureDynamicSessionToolParams
, "code"
>
Python code to be executed generated by llm.
Returns
Promise
<InterpreterToolOutput
>
The result, stdout, and stderr.
Implementation of
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:324
downloadFile()
downloadFile(
params
):Promise
<void
|ReadableStream
<any
>>
Download a file from the session back to your local environment.
Parameters
• params: DownloadFileMetadata
Returns
Promise
<void
| ReadableStream
<any
>>
The file as a ReadableStream if no localFilename is provided. Otherwise, the file is saved to the localFilename.
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:252
listFiles()
listFiles():
Promise
<RemoteFileMetadata
[]>
List the files in the session.
Returns
Promise
<RemoteFileMetadata
[]>
The metadata for the files in the session
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:294
uploadFile()
uploadFile(
params
):Promise
<RemoteFileMetadata
>
Upload a file to the session under the path /mnt/data
.
Parameters
• params: UploadFileMetadata
Returns
Promise
<RemoteFileMetadata
>
The remote file object. The list of metadatas for the uploaded files.
Defined in
packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:221