class SupabaseTranslatorconst selfQueryRetriever = new SelfQueryRetriever({
llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
vectorStore: new SupabaseVectorStore(),
documentContents: "Brief summary of a movie",
attributeInfo: [],
structuredQueryTranslator: new SupabaseTranslator(),
});
const queryResult = await selfQueryRetriever.getRelevantDocuments(
"Which movies are directed by Greta Gerwig?",
);A specialized translator designed to work with Supabase, extending the BaseTranslator class. It translates structured queries into a format that can be understood by the Supabase database.