Adds a file to an AI assistant that can be available for retrieval or code analyzer.
The ID of the assistant.
The file to be added.
A promise that resolves to the ID of the added file.
Adds a file to a specific thread of an AI assistant. These files can be used when asking a question in the thread.
The ID of the thread.
The file to be added.
A promise that resolves to the ID of the added file.
Creates a new AI assistant with specified characteristics.
The name of the assistant.
Instructions for the assistant.
Array of function names annotated with "@aiFunction" in your Squid backend that will be available to the assistant.
Optional
toolTypes: AssistantToolType[]Optional array of tool types. If you want to use files for retrieval, you must add them using the addFileToAssistant method.
A promise that resolves to the created assistant's ID.
Creates a new thread for an AI assistant. A thread is a long-lived conversation with the assistant that you can always send questions to.
The ID of the assistant for which the thread is created.
A promise that resolves to the created thread's ID.
Deletes an AI assistant.
The ID of the assistant to be deleted.
A promise that resolves when the assistant is deleted.
Deletes a thread of an AI assistant.
The ID of the thread to be deleted.
A promise that resolves when the thread is deleted.
Queries an AI assistant within a specific thread.
The ID of the assistant.
The ID of the thread.
The query prompt.
Optional
fileIds: string[]Optional array of file IDs to include in the query. These file IDs need to be added using the addFileToThread method.
Optional
options: QueryAssistantOptionsOptional query options.
A promise that resolves to the assistant's response.
Removes a file from an AI assistant.
The ID of the assistant.
The ID of the file to be removed.
A promise that resolves when the file is removed.
Client class for interacting with an AI Assistant server. Provides functionalities like creating and deleting assistants and threads, querying assistants, and managing files associated with assistants and threads.