mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 08:58:48 +00:00
docs: deprecation of max_length parameter used in Exa search (#22567)
This commit is contained in:
parent
af129974a3
commit
67012c2558
@ -65,6 +65,17 @@
|
|||||||
"ExaSearchRetriever is a retriever that uses Exa Search to retrieve relevant documents."
|
"ExaSearchRetriever is a retriever that uses Exa Search to retrieve relevant documents."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
":::{.callout-note}\n",
|
||||||
|
"\n",
|
||||||
|
"The `max_characters` parameter for **TextContentsOptions** used to be called `max_length` which is now deprecated. Make sure to use `max_characters` instead.\n",
|
||||||
|
"\n",
|
||||||
|
":::"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": 10,
|
||||||
@ -96,7 +107,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"# retrieve 5 documents, with content truncated at 1000 characters\n",
|
"# retrieve 5 documents, with content truncated at 1000 characters\n",
|
||||||
"retriever = ExaSearchRetriever(\n",
|
"retriever = ExaSearchRetriever(\n",
|
||||||
" k=5, text_contents_options=TextContentsOptions(max_length=200)\n",
|
" k=5, text_contents_options=TextContentsOptions(max_characters=200)\n",
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"prompt = PromptTemplate.from_template(\n",
|
"prompt = PromptTemplate.from_template(\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user