@azure/openai-assistants package

Classes

AssistantsClient

Client handling assistant-related operations.

AzureKeyCredential

A static-key-based credential that supports updating the underlying key value.

OpenAIKeyCredential

The OpenAIKeyCredential class represents an OpenAI API key and is used to authenticate into an Assistants client for an OpenAI endpoint.

Interfaces

Assistant

Represents an assistant that can call the model and use tools.

AssistantCreationOptions

The request details to use when creating a new assistant.

AssistantDeletionStatus

The status of an assistant deletion operation.

AssistantFile

Information about a file attached to an assistant, as used by tools that can read files.

AssistantFileDeletionStatus

The status of an assistant file deletion operation.

AssistantThread

Information about a single thread associated with an assistant.

AssistantThreadCreationOptions

The details used to create a new assistant thread.

AssistantsClientOptions

The details used to create a assistant client *

CancelRunOptions

The details used to cancel a run.

CodeInterpreterImageOutput

A representation of an image output emitted by a code interpreter tool in response to a tool call by the model.

CodeInterpreterImageReference

An image reference emitted by a code interpreter tool in response to a tool call by the model.

CodeInterpreterLogOutput

A representation of a log output emitted by a code interpreter tool in response to a tool call by the model.

CodeInterpreterToolCall

A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that represents inputs and outputs consumed and emitted by the code interpreter.

CodeInterpreterToolCallDetails

The detailed information about a code interpreter invocation by the model.

CodeInterpreterToolDefinition

The input definition information for a code interpreter tool as used to configure an assistant.

CreateAndRunThreadOptions

The details used when creating and immediately running a new assistant thread.

CreateAssistantFileOptions

The details used to create an assistant file.

CreateAssistantOptions

The details used to create an assistant.

CreateMessageOptions

The details used to create a message.

CreateRunOptions

The details used when creating a new run of an assistant thread.

CreateRunRequestOptions

The details used to create a run request.

CreateThreadAndRunOptions

The details used to create and run a thread.

CreateThreadOptions

The details used to create a thread.

DeleteAssistantFileOptions

The details used to delete an assistant file.

DeleteAssistantOptions

The details used to delete an assistant.

DeleteFileOptions

The details used to delete files.

DeleteThreadOptions

The details used to delete a thread.

DeletionStatus

An abstract representation of an OpenAI deletion operation result status.

FileDeletionStatus

A status response from a file deletion operation.

FileListResponse

The response data from a file list operation.

FunctionDefinition

The input definition information for a function.

FunctionToolCall

A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs and output consumed and emitted by the specified function.

FunctionToolCallDetails

The detailed information about the function called by the model.

FunctionToolDefinition

The input definition information for a function tool as used to configure an assistant.

GetAssistantFileOptions

The details used to get an assistant file.

GetAssistantOptions

The details used to get an assistant.

GetFileOptions

The details used to get files.

GetMessageFileOptions

The details used to get a message file.

GetMessageOptions

The details used to get a message.

GetRunOptions

The details used to get a run.

GetRunStepOptions

The details used to get a run step.

GetThreadOptions

The details used to get a thread.

InputFile

Represents an assistant that can call the model and use tools.

ListAssistantFilesOptions

The details used to list assistant files.

ListAssistantsOptions

The details used to list assistants.

ListFilesOptions

The details used to list files.

ListMessageFilesOptions

The details used to list message files.

ListMessagesOptions

The details used to list messages.

ListResponseOf

The response data for a requested list of items.

ListRunStepsOptions

The details used to list run steps.

ListRunsOptions

The details used to list runs.

MessageFile

Information about a file attached to an assistant thread message.

MessageImageFileContent

A representation of image file content in a thread message.

MessageImageFileDetails

An image reference, as represented in thread message content.

MessageTextContent

A representation of a textual item of thread message content.

MessageTextDetails

The text and associated annotations for a single item of assistant thread message content.

MessageTextFileCitationAnnotation

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the 'retrieval' tool to search files.

MessageTextFileCitationDetails

A representation of a file-based text citation, as used in a file-based annotation of text thread message content.

MessageTextFilePathAnnotation

A citation within the message that points to a file located at a specific path.

MessageTextFilePathDetails

An encapsulation of an image file ID, as used by message image content.

RequiredAction

An abstract representation of a required action for an assistant thread run to continue.

RequiredFunctionToolCall

A representation of a requested call to a function tool, needed by the model to continue evaluation of a run.

RetrievalToolCall

A record of a call to a retrieval tool, issued by the model in evaluation of a defined tool, that represents executed retrieval actions.

RetrievalToolDefinition

The input definition information for a retrieval tool as used to configure an assistant.

RunError

The details of an error as encountered by an assistant thread run.

RunStep

Detailed information about a single step of an assistant thread run.

RunStepError

The error information associated with a failed run step.

RunStepMessageCreationDetails

The detailed information associated with a message creation run step.

RunStepMessageCreationReference

The details of a message created as a part of a run step.

RunStepToolCallDetails

The detailed information associated with a run step calling tools.

SubmitToolOutputsDetails

The details describing tools that should be called to submit tool outputs.

SubmitToolOutputsToRunOptions

The details used to submit tool outputs to a run.

ThreadDeletionStatus

The status of a thread deletion operation.

ThreadMessage

A single, existing message within an assistant thread.

ThreadRun

Data representing a single evaluation run of an assistant thread.

ToolOutput

The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue.

UpdateAssistantOptions

The request details to use when modifying an existing assistant.

UpdateAssistantRequestOptions

The details used to update an assistant.

UpdateMessageOptions

The details used to update a message.

UpdateRunOptions

The details used to update a run.

UpdateThreadOptions

The details used to update a thread.

UploadFileOptions

The details used to upload files.

Type Aliases

CodeInterpreterToolCallOutput

Alias for CodeInterpreterToolCallOutput

FilePurpose

"fine-tune", "fine-tune-results", "assistants", "assistants_output"

ListSortOrder

"asc", "desc"

MessageContent

Alias for MessageContent

MessageRole

"user", "assistant"

MessageTextAnnotation

Alias for MessageTextAnnotation

RequiredToolCall

Alias for RequiredToolCall

RunStatus

"queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired"

RunStepDetails

Alias for RunStepDetails

RunStepErrorCode

"server_error", "rate_limit_exceeded"

RunStepStatus

"in_progress", "cancelled", "failed", "completed", "expired"

RunStepType

"message_creation", "tool_calls"

ToolCall

Alias for ToolCall

ToolDefinition

An abstract representation of an input tool definition that an assistant can use.