Share via


CreateAgentThreadOptionalParams interface

Optional parameters for creating an agent thread.

Extends

Inherited Properties

abortSignal

The signal which can be used to abort requests.

messages

The initial messages to associate with the new thread.

metadata

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

requestOptions

Options used when creating and sending HTTP requests for this operation.

toolResources

A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

tracingOptions

Options used when tracing is enabled.

Inherited Property Details

abortSignal

The signal which can be used to abort requests.

abortSignal?: AbortSignalLike

Property Value

Inherited From OperationOptions.abortSignal

messages

The initial messages to associate with the new thread.

messages?: ThreadMessageOptions[]

Property Value

Inherited From AgentThreadCreationOptions.messages

metadata

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

metadata?: null | Record<string, string>

Property Value

null | Record<string, string>

Inherited From AgentThreadCreationOptions.metadata

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

onResponse?: RawResponseCallback

Property Value

Inherited From OperationOptions.onResponse

requestOptions

Options used when creating and sending HTTP requests for this operation.

requestOptions?: OperationRequestOptions

Property Value

Inherited From OperationOptions.requestOptions

toolResources

A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

toolResources?: null | ToolResources

Property Value

null | ToolResources

Inherited From AgentThreadCreationOptions.toolResources

tracingOptions

Options used when tracing is enabled.

tracingOptions?: OperationTracingOptions

Property Value

Inherited From OperationOptions.tracingOptions