Share via


AssistantsClient Class

Definition

Azure OpenAI APIs for Assistants.

public class AssistantsClient
type AssistantsClient = class
Public Class AssistantsClient
Inheritance
AssistantsClient

Constructors

AssistantsClient()

Initializes a new instance of AssistantsClient for mocking.

AssistantsClient(String)

Creates a new instance of AssistantsClient for use with OpenAI's api.openai.com endpoint.

AssistantsClient(String, AssistantsClientOptions)

Creates a new instance of AssistantsClient for use with OpenAI's api.openai.com endpoint.

AssistantsClient(Uri, AzureKeyCredential)

Creates a new instance of AssistantsClient for use with an Azure OpenAI resource.

AssistantsClient(Uri, AzureKeyCredential, AssistantsClientOptions)

Creates a new instance of AssistantsClient for use with an Azure OpenAI resource.

AssistantsClient(Uri, TokenCredential)

Creates a new instance of AssistantsClient for use with an Azure OpenAI resource.

AssistantsClient(Uri, TokenCredential, AssistantsClientOptions)

Creates a new instance of AssistantsClient for use with an Azure OpenAI resource.

Properties

Pipeline

The HTTP pipeline for sending and receiving REST requests and responses.

Methods

CancelRun(String, String, CancellationToken)

Cancels a run of an in progress thread.

CancelRunAsync(String, String, CancellationToken)

Cancels a run of an in progress thread.

CreateAssistant(AssistantCreationOptions, CancellationToken)

Creates a new assistant.

CreateAssistantAsync(AssistantCreationOptions, CancellationToken)

Creates a new assistant.

CreateMessage(String, MessageRole, String, IEnumerable<String>, IDictionary<String,String>, CancellationToken)

Creates a new message on a specified thread.

CreateMessageAsync(String, MessageRole, String, IEnumerable<String>, IDictionary<String,String>, CancellationToken)

Creates a new message on a specified thread.

CreateRun(AssistantThread, Assistant, CancellationToken)

Creates a new run of the specified thread using a specified assistant.

CreateRun(String, CreateRunOptions, CancellationToken)

Creates a new run for an assistant thread.

CreateRunAsync(AssistantThread, Assistant, CancellationToken)

Creates a new run of the specified thread using a specified assistant.

CreateRunAsync(String, CreateRunOptions, CancellationToken)

Creates a new run for an assistant thread.

CreateThread(AssistantThreadCreationOptions, CancellationToken)

Creates a new thread. Threads contain messages and can be run by assistants.

CreateThread(CancellationToken)

Creates a new, empty thread using a default AssistantThreadCreationOptions instance.

CreateThreadAndRun(CreateAndRunThreadOptions, CancellationToken)

Creates a new assistant thread and immediately starts a run using that new thread.

CreateThreadAndRunAsync(CreateAndRunThreadOptions, CancellationToken)

Creates a new assistant thread and immediately starts a run using that new thread.

CreateThreadAsync(AssistantThreadCreationOptions, CancellationToken)

Creates a new thread. Threads contain messages and can be run by assistants.

CreateThreadAsync(CancellationToken)

Creates a new, empty thread using a default AssistantThreadCreationOptions instance.

DeleteAssistant(String, CancellationToken)

Deletes an assistant.

DeleteAssistantAsync(String, CancellationToken)

Deletes an assistant.

DeleteFile(String, CancellationToken)

Delete a previously uploaded file.

DeleteFileAsync(String, CancellationToken)

Delete a previously uploaded file.

DeleteThread(String, CancellationToken)

Deletes a thread.

DeleteThreadAsync(String, CancellationToken)

Deletes a thread.

GetAssistant(String, CancellationToken)

Retrieves an existing assistant.

GetAssistantAsync(String, CancellationToken)

Retrieves an existing assistant.

GetAssistantFile(String, String, CancellationToken)

Retrieves a file attached to an assistant.

GetAssistantFileAsync(String, String, CancellationToken)

Retrieves a file attached to an assistant.

GetAssistantFiles(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of files attached to a specific assistant, as used by tools that can read files.

GetAssistantFilesAsync(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of files attached to a specific assistant, as used by tools that can read files.

GetAssistants(Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of assistants that were previously created.

GetAssistantsAsync(Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of assistants that were previously created.

GetFile(String, CancellationToken)

Returns information about a specific file. Does not retrieve file content.

GetFileAsync(String, CancellationToken)

Returns information about a specific file. Does not retrieve file content.

GetFileContent(String, CancellationToken)

Returns information about a specific file. Does not retrieve file content.

GetFileContentAsync(String, CancellationToken)

Returns information about a specific file. Does not retrieve file content.

GetFiles(Nullable<OpenAIFilePurpose>, CancellationToken)

Returns a list of files that belong to the user's organization.

GetFilesAsync(Nullable<OpenAIFilePurpose>, CancellationToken)

Returns a list of files that belong to the user's organization.

GetMessage(String, String, CancellationToken)

Gets an existing message from an existing thread.

GetMessageAsync(String, String, CancellationToken)

Gets an existing message from an existing thread.

GetMessageFile(String, String, String, CancellationToken)

Gets information about a file attachment to a message within a thread.

GetMessageFileAsync(String, String, String, CancellationToken)

Gets information about a file attachment to a message within a thread.

GetMessageFiles(String, String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of previously uploaded files associated with a message from a thread.

GetMessageFilesAsync(String, String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of previously uploaded files associated with a message from a thread.

GetMessages(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of messages that exist on a thread.

GetMessagesAsync(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of messages that exist on a thread.

GetRun(String, String, CancellationToken)

Gets an existing run from an existing thread.

GetRunAsync(String, String, CancellationToken)

Gets an existing run from an existing thread.

GetRuns(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of runs for a specified thread.

GetRunsAsync(String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of runs for a specified thread.

GetRunStep(String, String, String, CancellationToken)

Gets a single run step from a thread run.

GetRunStepAsync(String, String, String, CancellationToken)

Gets a single run step from a thread run.

GetRunSteps(String, String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of run steps from a thread run.

GetRunSteps(ThreadRun, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Returns a list of run steps associated an assistant thread run.

GetRunStepsAsync(String, String, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Gets a list of run steps from a thread run.

GetRunStepsAsync(ThreadRun, Nullable<Int32>, Nullable<ListSortOrder>, String, String, CancellationToken)

Returns a list of run steps associated an assistant thread run.

GetThread(String, CancellationToken)

Gets information about an existing thread.

GetThreadAsync(String, CancellationToken)

Gets information about an existing thread.

LinkAssistantFile(String, String, CancellationToken)

Attaches a previously uploaded file to an assistant for use by tools that can read files.

LinkAssistantFileAsync(String, String, CancellationToken)

Attaches a previously uploaded file to an assistant for use by tools that can read files.

SubmitToolOutputsToRun(String, String, IEnumerable<ToolOutput>, CancellationToken)

Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.

SubmitToolOutputsToRun(ThreadRun, IEnumerable<ToolOutput>, CancellationToken)

Submits outputs from tool calls as requested by a run with a status of 'requires_action' with required_action.type of 'submit_tool_outputs'.

SubmitToolOutputsToRunAsync(String, String, IEnumerable<ToolOutput>, CancellationToken)

Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.

SubmitToolOutputsToRunAsync(ThreadRun, IEnumerable<ToolOutput>, CancellationToken)

Submits outputs from tool calls as requested by a run with a status of 'requires_action' with required_action.type of 'submit_tool_outputs'.

UnlinkAssistantFile(String, String, CancellationToken)

Associates a previously uploaded file with an assistant for use by supported tools.

UnlinkAssistantFileAsync(String, String, CancellationToken)

Removes an association between an uploaded file and an assistant, making it inaccessible to supported tools for that assistant.

UpdateAssistant(String, UpdateAssistantOptions, CancellationToken)

Modifies an existing assistant.

UpdateAssistantAsync(String, UpdateAssistantOptions, CancellationToken)

Modifies an existing assistant.

UpdateMessage(String, String, IDictionary<String,String>, CancellationToken)

Modifies an existing message on an existing thread.

UpdateMessageAsync(String, String, IDictionary<String,String>, CancellationToken)

Modifies an existing message on an existing thread.

UpdateRun(String, String, IDictionary<String,String>, CancellationToken)

Modifies an existing thread run.

UpdateRunAsync(String, String, IDictionary<String,String>, CancellationToken)

Modifies an existing thread run.

UpdateThread(String, IDictionary<String,String>, CancellationToken)

Modifies an existing thread.

UpdateThreadAsync(String, IDictionary<String,String>, CancellationToken)

Modifies an existing thread.

UploadFile(Stream, OpenAIFilePurpose, String, CancellationToken)

Uploads a file for use by other operations.

UploadFile(String, OpenAIFilePurpose, CancellationToken)

Uploads a file from a local file path accessible to File.

UploadFileAsync(Stream, OpenAIFilePurpose, String, CancellationToken)

Uploads a file for use by other operations.

UploadFileAsync(String, OpenAIFilePurpose, CancellationToken)

Uploads a file from a local file path accessible to File.

Applies to