UNPKG

llamaindex

Version:

<p align="center"> <img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" /> </p> <h1 align="center">LlamaIndex.TS</h1> <h3 align="center"> Data framework for your LLM application. </h3>

21 lines (20 loc) 951 B
import type { BaseTool, ToolMetadata } from "@llamaindex/core/llms"; import type { BaseQueryEngine } from "@llamaindex/core/query-engine"; import type { JSONSchemaType } from "ajv"; export type QueryEngineToolParams = { queryEngine: BaseQueryEngine; metadata?: ToolMetadata<JSONSchemaType<QueryEngineParam>> | undefined; includeSourceNodes?: boolean; }; export type QueryEngineParam = { query: string; }; export declare class QueryEngineTool implements BaseTool<QueryEngineParam> { private queryEngine; metadata: ToolMetadata<JSONSchemaType<QueryEngineParam>>; includeSourceNodes: boolean; constructor({ queryEngine, metadata, includeSourceNodes, }: QueryEngineToolParams); call({ query }: QueryEngineParam): Promise<string | number | boolean | import("@llamaindex/core/global").JSONObject | import("@llamaindex/core/global").JSONArray | { content: import("@llamaindex/core/llms").MessageContent; }>; }