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
constchromaTranslator = newChromaTranslator(); constselfQueryRetriever = newSelfQueryRetriever({ llm:newChatOpenAI(), vectorStore:newChroma(), documentContents:"Brief summary of a movie", attributeInfo: [], structuredQueryTranslator:chromaTranslator, });
constrelevantDocuments = awaitselfQueryRetriever.getRelevantDocuments( "Which movies are directed by Greta Gerwig?", );
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