Returns a reference to the specified AI agent. If no ID is provided, the built-in agent is used by default.
Retrieves an AI audio client.
Request to execute an AI-powered API call. Allows specifying allowed endpoints and whether to provide an explanation.
Optional
allowedEndpoints: string[]Optional
provideExplanation: booleanExecutes an AI query using a specific DB integration, sending a prompt to the AI and returning its response. This function allows for direct interaction with the AI's capabilities by sending text prompts and receiving the AI's responses, which can be used for various applications such as automating tasks, generating content, or obtaining information.
The identifier for the DB integration which is used to direct the query to the appropriate DB.
The text prompt to send to the AI. This should be formulated in a way that the AI can understand and respond to, taking into account the nature of the task or the information sought.
Optional
options: ExecuteAiQueryOptionsAdditional options to customize the query execution.
A promise that resolves to an ExecuteAiQueryResponse
. This response includes the AI's
reply to the provided prompt, along with any other relevant information that is part of
the AI's response. The promise can be awaited to handle the response asynchronously.
const response = await ai().executeAiQuery(myDbIntegrationId, "How many transactions ran yesterday?");
console.log(response);
For more details on the usage and capabilities of the AI Assistant, refer to the documentation provided at https://docs.squid.cloud/docs/ai.
Executes an AI query across multiple database integrations and returns their responses. Useful when querying multiple sources with the same prompt.
The list of integration IDs to query.
The prompt to send to the AI.
Optional
options: ExecuteAiQueryOptionsOptional query execution parameters.
A promise resolving to the responses from all queried integrations.
Retrieves an AI image client.
Lists all available AI agents.
Retrieves an AI match-making client.
AiClient class serves as a facade for interacting with different AI services. It provides simplified access to AI chatbot and assistant functionalities through its methods.