-
Checked other resources
Commit to Help
Example Codeconst selfQueryRetriever = await SelfQueryRetriever.fromLLM({
llm: new ChatOpenAI(),
vectorStore: new PineconeStore(),
documentContents: "Brief summary of a movie",
attributeInfo: [],
structuredQueryTranslator: new PineconeTranslator(),
}); DescriptionThe documentation and tests for Is that a mistake or this is intended? If it's a mistake, I will happily raise a PR to fix it. Thanks! System InfoVersion: 0.1.33 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The use of const selfQueryRetriever = SelfQueryRetriever.fromLLM({
llm: new ChatOpenAI(),
vectorStore: new PineconeStore(),
documentContents: "Brief summary of a movie",
attributeInfo: [],
structuredQueryTranslator: new PineconeTranslator(),
}); This oversight in the documentation could lead to confusion, and your initiative to correct it by proposing a pull request is valuable. Since the method directly returns a new instance of Sources
|
Beta Was this translation helpful? Give feedback.
The use of
await
withSelfQueryRetriever.fromLLM
in the documentation is indeed unnecessary since the method is synchronous and does not return aPromise
. It should be called withoutawait
as follows:This oversight in the documentation could lead to confusion, and your initiative to correct it by proposing a pull request is valuable. Since the method directly returns a new instance of
SelfQueryRetriever
without involving any asynchronous ope…