agsamantha/node_modules/@langchain/community/dist/structured_query/chroma.d.ts

27 lines
992 B
TypeScript
Raw Normal View History

2024-10-02 20:15:21 +00:00
import { BasicTranslator } from "@langchain/core/structured_query";
import { Chroma } from "../vectorstores/chroma.js";
/**
* Specialized translator for the Chroma vector database. It extends the
* BasicTranslator class and translates internal query language elements
* to valid filters. The class defines a subset of allowed logical
* operators and comparators that can be used in the translation process.
* @example
* ```typescript
* const chromaTranslator = new ChromaTranslator();
* const selfQueryRetriever = new SelfQueryRetriever({
* llm: new ChatOpenAI(),
* vectorStore: new Chroma(),
* documentContents: "Brief summary of a movie",
* attributeInfo: [],
* structuredQueryTranslator: chromaTranslator,
* });
*
* const relevantDocuments = await selfQueryRetriever.getRelevantDocuments(
* "Which movies are directed by Greta Gerwig?",
* );
* ```
*/
export declare class ChromaTranslator<T extends Chroma> extends BasicTranslator<T> {
constructor();
}