Table of Contents

Class AssistantDefinitionFiles

Namespace
AntRunnerLib.AssistantDefinitions
Assembly
AntRunnerLib.dll

Provides methods for reading assistant definition files from the file system or storage. Files from storage by default must be located under ./Assistants where the "./" represents the execution folder. Set your files to "Copy Always" to copy them to the correct location(s) at build time. Set the "ASSISTANTS_BASE_FOLDER_PATH" environment variable to override the default location "./Assistants""

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

GetActionAuth(String)

Reads the assistant action authorization from the file system or storage.

public static async Task<string> GetActionAuth(string assistantName)

Parameters

assistantName System.String

The name of the assistant.

Returns

Task<System.String>

A task that represents the asynchronous operation. The task result contains the assistant action authorization.

GetFile(String)

Retrieves a file from the file system or storage.

public static async Task<byte[]> GetFile(string filePath)

Parameters

filePath System.String

The path of the file.

Returns

Task<System.Byte[]>

A task that represents the asynchronous operation. The task result contains the byte array of the file content.

GetFilesInCodeInterpreterFolder(String)

Retrieves the list of files in the code interpreter folder for the specified assistant from the file system or storage.

public static async Task<IEnumerable<string>?> GetFilesInCodeInterpreterFolder(string assistantName)

Parameters

assistantName System.String

The name of the assistant.

Returns

Task<System.Nullable<IEnumerable<System.String>>>

A task that represents the asynchronous operation. The task result contains the list of files in the code interpreter folder.

GetFilesInOpenAPIFolder(String)

Retrieves the list of files in the OpenAPI folder for the specified assistant from the file system or storage.

public static async Task<IEnumerable<string>?> GetFilesInOpenAPIFolder(string assistantName)

Parameters

assistantName System.String

The name of the assistant.

Returns

Task<System.Nullable<IEnumerable<System.String>>>

A task that represents the asynchronous operation. The task result contains the list of files in the OpenAPI folder.

GetFilesInVectorStoreFolder(String, String)

Retrieves the list of files in the vector store folder for the specified assistant and vector store name from the file system or storage.

public static async Task<IEnumerable<string>?> GetFilesInVectorStoreFolder(string assistantName, string vectorStoreName)

Parameters

assistantName System.String

The name of the assistant.

vectorStoreName System.String

The name of the vector store.

Returns

Task<System.Nullable<IEnumerable<System.String>>>

A task that represents the asynchronous operation. The task result contains the list of files in the vector store folder.

GetInstructions(String)

Reads the assistant instructions from the file system or storage.

public static async Task<string> GetInstructions(string assistantName)

Parameters

assistantName System.String

The name of the assistant.

Returns

Task<System.String>

A task that represents the asynchronous operation. The task result contains the assistant instructions.

GetManifest(String)

Reads the assistant definition JSON from the file system or storage.

public static async Task<string> GetManifest(string assistantName)

Parameters

assistantName System.String

The name of the assistant.

Returns

Task<System.String>

A task that represents the asynchronous operation. The task result contains the assistant definition JSON.