Class AssistantUtility
- Namespace
- AntRunnerLib
- Assembly
- AntRunnerLib.dll
Fetch and create assistants
public static class AssistantUtility
- Inheritance
-
System.ObjectAssistantUtility
- Inherited Members
-
System.Object.Equals(System.Object)System.Object.Equals(System.Object, System.Object)System.Object.GetHashCode()System.Object.GetType()System.Object.MemberwiseClone()System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ToString()
Methods
Create(AssistantCreateRequest, AzureOpenAIConfig)
Creates an assistant
public static async Task<string> Create(AssistantCreateRequest assistantCreateRequest, AzureOpenAIConfig azureOpenAIConfig)
Parameters
assistantCreateRequestAssistantCreateRequestazureOpenAIConfigAzureOpenAIConfig
Returns
- Task<System.String>
Create(String, AzureOpenAIConfig)
Creates an assistant from a stored definition
public static async Task<string> Create(string assistantName, AzureOpenAIConfig azureOpenAIConfig)
Parameters
assistantNameSystem.StringazureOpenAIConfigAzureOpenAIConfig
Returns
- Task<System.String>
DeleteAssistant(String, AzureOpenAIConfig)
Delete an assistant by name
public static async Task DeleteAssistant(string assistantName, AzureOpenAIConfig azureOpenAIConfig)
Parameters
assistantNameSystem.StringazureOpenAIConfigAzureOpenAIConfig
Returns
- Task
GetAssistantCreateRequest(String)
Reads the assistant definition from an embedded resource or storage
public static async Task<AssistantCreateRequest> GetAssistantCreateRequest(string assistantName)
Parameters
assistantNameSystem.String
Returns
- Task<AssistantCreateRequest>
GetAssistantId(String, AzureOpenAIConfig)
Looks for an assistant and returns an Id if found, otherwise null
public static async Task<string> GetAssistantId(string assistantResourceName, AzureOpenAIConfig azureOpenAIConfig)
Parameters
assistantResourceNameSystem.StringThe name of the embedded resource
azureOpenAIConfigAzureOpenAIConfig
Returns
- Task<System.String>
ListAssistants(AzureOpenAIConfig)
Lists the assistants in the OpenAI deployment
public static async Task<List<AssistantResponse>?> ListAssistants(AzureOpenAIConfig azureOpenAIConfig)
Parameters
azureOpenAIConfigAzureOpenAIConfig
Returns
- Task<System.Nullable<List<AssistantResponse>>>