Skip to content

Documentation v1.0.0


Documentation / @openassistant/duckdb / LocalQueryContext

Type Alias: LocalQueryContext

LocalQueryContext = object

Defined in: types.ts:24

Context object for the localQuery tool

Properties

getDuckDB()?

optional getDuckDB: () => Promise<AsyncDuckDB | null>

Defined in: types.ts:36

Optional DuckDB instance for querying

Returns

Promise<AsyncDuckDB | null>


getMaxQueryResultLength()?

optional getMaxQueryResultLength: () => Promise<number>

Defined in: types.ts:41

Optional function to get the maximum length of the query result that will be returned to the LLM

Returns

Promise<number>


getValues()

getValues: (datasetName, variableName) => Promise<unknown[]>

Defined in: types.ts:31

Function to get values from a dataset

Parameters

datasetName

string

The name of the dataset

variableName

string

The name of the variable to get values for

Returns

Promise<unknown[]>

An array of values for the specified variable

Released under the MIT License.