Skip to main content

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

AzureDynamicSessionTool

Defined in

packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:189

Properties

metadata

metadata: ToolMetadata

The metadata for the tool.

Implementation of

BaseTool.metadata

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:203


call()

call(code): Promise<InterpreterToolOutput>

This could be undefined if the implementation is not provided, which might be the case when communicating with a llm.

Parameters

code: Pick<AzureDynamicSessionToolParams, "code">

Python code to be executed generated by llm.

Returns

Promise<InterpreterToolOutput>

The result, stdout, and stderr.

Implementation of

BaseTool.call

Defined in

packages/llamaindex/src/tools/AzureDynamicSessionTool.node.ts:322


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:250


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:292


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:219