@sqlrooms/ai / createQueryTool
Function: createQueryTool()
createQueryTool(
store,options?):object
Parameters
| Parameter | Type |
|---|---|
store | StoreApi<AiSliceState & DuckDbSliceState> |
options? | QueryToolOptions |
Returns
object
| Name | Type | Default value |
|---|---|---|
name | string | 'query' |
description | string | - |
parameters | ZodObject<{ type: ZodLiteral<"query">; sqlQuery: ZodString; reasoning: ZodString; }, $strip> | QueryToolParameters |
execute() | (params, options?) => Promise<{ llmResult: { success: boolean; data: { type: "query"; summary: Record<string, unknown>[] | null; firstRows?: Record<string, unknown>[]; }; details?: undefined; errorMessage?: undefined; }; additionalData: { title: string; sqlQuery: string; }; } | { additionalData?: undefined; llmResult: { data?: undefined; success: boolean; details: string; errorMessage: string; }; }> | - |
component() | (props) => Element | QueryToolResult |
