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>
17 lines (16 loc) • 650 B
TypeScript
import { PromptMixin } from "@llamaindex/core/prompts";
import type { QueryType } from "@llamaindex/core/query-engine";
import type { ToolMetadataOnlyDescription } from "../types.js";
export interface SingleSelection {
index: number;
reason: string;
}
export type SelectorResult = {
selections: SingleSelection[];
};
type MetadataType = string | ToolMetadataOnlyDescription;
export declare abstract class BaseSelector extends PromptMixin {
select(choices: MetadataType[], query: QueryType): Promise<SelectorResult>;
abstract _select(choices: ToolMetadataOnlyDescription[], query: QueryType): Promise<SelectorResult>;
}
export {};