Partager via


OpenAIAssistantAgent.CreateThreadAsync Method

Definition

Overloads

CreateThreadAsync(CancellationToken)

Create a new assistant thread.

CreateThreadAsync(OpenAIThreadCreationOptions, CancellationToken)

Create a new assistant thread.

CreateThreadAsync(CancellationToken)

Create a new assistant thread.

public System.Threading.Tasks.Task<string> CreateThreadAsync (System.Threading.CancellationToken cancellationToken = default);
member this.CreateThreadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function CreateThreadAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

The thread identifier

Applies to

CreateThreadAsync(OpenAIThreadCreationOptions, CancellationToken)

Create a new assistant thread.

public System.Threading.Tasks.Task<string> CreateThreadAsync (Microsoft.SemanticKernel.Agents.OpenAI.OpenAIThreadCreationOptions? options, System.Threading.CancellationToken cancellationToken = default);
member this.CreateThreadAsync : Microsoft.SemanticKernel.Agents.OpenAI.OpenAIThreadCreationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function CreateThreadAsync (options As OpenAIThreadCreationOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

options
OpenAIThreadCreationOptions

The options for creating the thread

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

The thread identifier

Applies to