AssistantClientExtensions.CreateAssistantAsync 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.
Creates an assistant asynchronously with the specified options.
public static System.Threading.Tasks.Task<OpenAI.Assistants.Assistant> CreateAssistantAsync(this OpenAI.Assistants.AssistantClient client, string modelId, string? name = default, string? description = default, string? instructions = default, bool enableCodeInterpreter = false, System.Collections.Generic.IReadOnlyList<string>? codeInterpreterFileIds = default, bool enableFileSearch = false, string? vectorStoreId = default, float? temperature = default, float? topP = default, OpenAI.Assistants.AssistantResponseFormat? responseFormat = default, System.Collections.Generic.IReadOnlyDictionary<string,string>? metadata = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateAssistantAsync : OpenAI.Assistants.AssistantClient * string * string * string * string * bool * System.Collections.Generic.IReadOnlyList<string> * bool * string * Nullable<single> * Nullable<single> * OpenAI.Assistants.AssistantResponseFormat * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<OpenAI.Assistants.Assistant>
<Extension()>
Public Function CreateAssistantAsync (client As AssistantClient, modelId As String, Optional name As String = Nothing, Optional description As String = Nothing, Optional instructions As String = Nothing, Optional enableCodeInterpreter As Boolean = false, Optional codeInterpreterFileIds As IReadOnlyList(Of String) = Nothing, Optional enableFileSearch As Boolean = false, Optional vectorStoreId As String = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional topP As Nullable(Of Single) = Nothing, Optional responseFormat As AssistantResponseFormat = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Assistant)
Parameters
- client
- OpenAI.Assistants.AssistantClient
The assistant client.
- modelId
- String
The model identifier.
- name
- String
The name of the assistant.
- description
- String
The description of the assistant.
- instructions
- String
The instructions for the assistant.
- enableCodeInterpreter
- Boolean
Whether to enable the code interpreter tool.
- codeInterpreterFileIds
- IReadOnlyList<String>
The file IDs for the code interpreter tool.
- enableFileSearch
- Boolean
Whether to enable the file search tool.
- vectorStoreId
- String
The vector store identifier.
- responseFormat
- OpenAI.Assistants.AssistantResponseFormat
The response format for the assistant.
- metadata
- IReadOnlyDictionary<String,String>
The metadata for the assistant.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A task that represents the asynchronous operation. The task result contains the created assistant.