OpenAIAssistantAgent.CreateThreadAsync 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
CreateThreadAsync(CancellationToken) |
Obsolete.
Creates a new assistant thread. |
CreateThreadAsync(OpenAIThreadCreationOptions, CancellationToken) |
Obsolete.
Creates a new assistant thread. |
CreateThreadAsync(CancellationToken)
Caution
Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.
Creates a new assistant thread.
[System.Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")]
public System.Threading.Tasks.Task<string> CreateThreadAsync(System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")>]
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.
- Attributes
Applies to
CreateThreadAsync(OpenAIThreadCreationOptions, CancellationToken)
Caution
Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.
Creates a new assistant thread.
[System.Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")]
public System.Threading.Tasks.Task<string> CreateThreadAsync(Microsoft.SemanticKernel.Agents.OpenAI.OpenAIThreadCreationOptions? options, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use the OpenAIAssistantAgentThread to create a thread or use invoke without a thread to create a new one. This method will be removed after May 1st 2025.")>]
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.
- Attributes