@ -216,7 +216,7 @@
"outputs": [],
"source": [
"# This example only specifies a relevant query\n",
"retriever.get_relevant_documents (\"What are some movies about dinosaurs\")"
"retriever.invoke (\"What are some movies about dinosaurs\")"
]
},
{
@ -227,7 +227,7 @@
"outputs": [],
"source": [
"# This example only specifies a filter\n",
"retriever.get_relevant_documents (\"I want to watch a movie rated higher than 8.5\")"
"retriever.invoke (\"I want to watch a movie rated higher than 8.5\")"
]
},
{
@ -238,7 +238,7 @@
"outputs": [],
"source": [
"# This example specifies a query and a filter\n",
"retriever.get_relevant_documents (\"Has Greta Gerwig directed any movies about women\")"
"retriever.invoke (\"Has Greta Gerwig directed any movies about women\")"
]
},
{
@ -249,9 +249,7 @@
"outputs": [],
"source": [
"# This example specifies a composite filter\n",
"retriever.get_relevant_documents(\n",
" \"What's a highly rated (above 8.5) science fiction film?\"\n",
")"
"retriever.invoke(\"What's a highly rated (above 8.5) science fiction film?\")"
]
},
{
@ -262,7 +260,7 @@
"outputs": [],
"source": [
"# This example specifies a query and composite filter\n",
"retriever.get_relevant_documents (\n",
"retriever.invoke (\n",
" \"What's a movie after 1990 but before 2005 that's all about toys, and preferably is animated\"\n",
")"
]
@ -285,7 +283,7 @@
"outputs": [],
"source": [
"# You can use length(genres) to do anything you want\n",
"retriever.get_relevant_documents (\"What's a movie that have more than 1 genres?\")"
"retriever.invoke (\"What's a movie that have more than 1 genres?\")"
]
},
{
@ -296,7 +294,7 @@
"outputs": [],
"source": [
"# Fine-grained datetime? You got it already.\n",
"retriever.get_relevant_documents (\"What's a movie that release after feb 1995?\")"
"retriever.invoke (\"What's a movie that release after feb 1995?\")"
]
},
{
@ -307,7 +305,7 @@
"outputs": [],
"source": [
"# Don't know what your exact filter should be? Use string pattern match!\n",
"retriever.get_relevant_documents (\"What's a movie whose name is like Andrei?\")"
"retriever.invoke (\"What's a movie whose name is like Andrei?\")"
]
},
{
@ -318,9 +316,7 @@
"outputs": [],
"source": [
"# Contain works for lists: so you can match a list with contain comparator!\n",
"retriever.get_relevant_documents(\n",
" \"What's a movie who has genres science fiction and adventure?\"\n",
")"
"retriever.invoke(\"What's a movie who has genres science fiction and adventure?\")"
]
},
{
@ -364,7 +360,7 @@
"outputs": [],
"source": [
"# This example only specifies a relevant query\n",
"retriever.get_relevant_documents (\"what are two movies about dinosaurs\")"
"retriever.invoke (\"what are two movies about dinosaurs\")"
]
}
],