Table of Contents

Class AssistantUtility

Namespace
AntRunnerLib
Assembly
AntRunnerLib.dll

Fetch and create assistants

public static class AssistantUtility
Inheritance
System.Object
AssistantUtility
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

assistantCreateRequest AssistantCreateRequest
azureOpenAIConfig AzureOpenAIConfig

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

assistantName System.String
azureOpenAIConfig AzureOpenAIConfig

Returns

Task<System.String>

DeleteAssistant(String, AzureOpenAIConfig)

Delete an assistant by name

public static async Task DeleteAssistant(string assistantName, AzureOpenAIConfig azureOpenAIConfig)

Parameters

assistantName System.String
azureOpenAIConfig AzureOpenAIConfig

Returns

Task

GetAssistantCreateRequest(String)

Reads the assistant definition from an embedded resource or storage

public static async Task<AssistantCreateRequest> GetAssistantCreateRequest(string assistantName)

Parameters

assistantName System.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

assistantResourceName System.String

The name of the embedded resource

azureOpenAIConfig AzureOpenAIConfig

Returns

Task<System.String>

ListAssistants(AzureOpenAIConfig)

Lists the assistants in the OpenAI deployment

public static async Task<List<AssistantResponse>?> ListAssistants(AzureOpenAIConfig azureOpenAIConfig)

Parameters

azureOpenAIConfig AzureOpenAIConfig

Returns

Task<System.Nullable<List<AssistantResponse>>>