Skip to content

Commit

Permalink
Fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Aug 5, 2024
1 parent e5f439a commit 656dd8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@
"metadata": {},
"outputs": [],
"source": [
"import { SelfQueryRetriever } from \"langchain/retrievers/self_query\";\n",
"import { FunctionalTranslator } from \"@langchain/core/structured_query\";\n",
"\n",
"const selfQueryRetriever = SelfQueryRetriever.fromLLM({\n",
" llm: llm,\n",
" vectorStore: vectorStore,\n",
Expand Down Expand Up @@ -350,16 +353,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "cb9ddd99",
"metadata": {},
"outputs": [],
"source": [
"const selfQueryRetrieverWithDefaultParams = SelfQueryRetriever.fromLLM({\n",
" llm,\n",
" vectorStore,\n",
" llm: llm,\n",
" vectorStore: vectorStore,\n",
" documentContents: \"Brief summary of a movie\",\n",
" attributeInfo,\n",
" attributeInfo: attributeInfo,\n",
" structuredQueryTranslator: new FunctionalTranslator(),\n",
" searchParams: {\n",
" filter: (doc: Document) => doc.metadata && doc.metadata.rating > 8.5,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"const selfQueryRetrieverWithDefaultParams = SelfQueryRetriever.fromLLM({\n",
" llm,\n",
" vectorStore,\n",
" documentContents,\n",
" documentContents: \"Brief summary of a movie\",\n",
" attributeInfo,\n",
" /**\n",
" * We need to use a translator that translates the queries into a\n",
Expand Down

0 comments on commit 656dd8f

Please sign in to comment.