mirror of
https://github.com/hwchase17/langchain
synced 2024-11-13 19:10:52 +00:00
update
This commit is contained in:
parent
4451b670dc
commit
99923f6fa9
@ -223,7 +223,7 @@
|
||||
" num_lists, dimensions, similarity_algorithm, kind, m, ef_construction\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"'''\n",
|
||||
"\"\"\"\n",
|
||||
"# DiskANN vectorstore\n",
|
||||
"maxDegree = 40\n",
|
||||
"dimensions = 1536\n",
|
||||
@ -255,7 +255,7 @@
|
||||
" m=m,\n",
|
||||
" ef_construction=ef_construction,\n",
|
||||
" )\n",
|
||||
"'''"
|
||||
"\"\"\""
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -418,7 +418,9 @@
|
||||
],
|
||||
"source": [
|
||||
"# create a filter index\n",
|
||||
"vectorstore.create_filter_index(property_to_filter= \"metadata.source\", index_name='filter_index')"
|
||||
"vectorstore.create_filter_index(\n",
|
||||
" property_to_filter=\"metadata.source\", index_name=\"filter_index\"\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -430,8 +432,7 @@
|
||||
"source": [
|
||||
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
|
||||
"docs = vectorstore.similarity_search(\n",
|
||||
" query,\n",
|
||||
" pre_filter= {\"metadata.source\": { \"$ne\": \"filter content\" } }\n",
|
||||
" query, pre_filter={\"metadata.source\": {\"$ne\": \"filter content\"}}\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
@ -465,7 +466,7 @@
|
||||
"source": [
|
||||
"docs = vectorstore.similarity_search(\n",
|
||||
" query,\n",
|
||||
" pre_filter= {\"metadata.source\": { \"$ne\": \"../../how_to/state_of_the_union.txt\" } }\n",
|
||||
" pre_filter={\"metadata.source\": {\"$ne\": \"../../how_to/state_of_the_union.txt\"}},\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user