AssistantsClient.CreateRun Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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. |
CreateRun(AssistantThread, Assistant, CancellationToken)
- Source:
- AssistantsClient.cs
Creates a new run of the specified thread using a specified assistant.
public virtual Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun> CreateRun (Azure.AI.OpenAI.Assistants.AssistantThread thread, Azure.AI.OpenAI.Assistants.Assistant assistant, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateRun : Azure.AI.OpenAI.Assistants.AssistantThread * Azure.AI.OpenAI.Assistants.Assistant * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun>
override this.CreateRun : Azure.AI.OpenAI.Assistants.AssistantThread * Azure.AI.OpenAI.Assistants.Assistant * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun>
Public Overridable Function CreateRun (thread As AssistantThread, assistant As Assistant, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ThreadRun)
Parameters
- thread
- AssistantThread
The thread that should be run.
- assistant
- Assistant
The assistant that should run the thread.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
A new ThreadRun instance.
Remarks
This method will create the run with default configuration. To customize the run, use CreateRun(String, CreateRunOptions, CancellationToken).
Applies to
CreateRun(String, CreateRunOptions, CancellationToken)
- Source:
- AssistantsClient.cs
Creates a new run for an assistant thread.
public virtual Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun> CreateRun (string threadId, Azure.AI.OpenAI.Assistants.CreateRunOptions createRunOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateRun : string * Azure.AI.OpenAI.Assistants.CreateRunOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun>
override this.CreateRun : string * Azure.AI.OpenAI.Assistants.CreateRunOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.ThreadRun>
Public Overridable Function CreateRun (threadId As String, createRunOptions As CreateRunOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ThreadRun)
Parameters
- threadId
- String
The ID of the thread to run.
- createRunOptions
- CreateRunOptions
The details for the run to create.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
threadId
or createRunOptions
is null.
threadId
is an empty string, and was expected to be non-empty.
Applies to
Azure SDK for .NET