mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Fix example match_documents fn table name, grammar (#3294)
ref https://github.com/hwchase17/langchain/pull/3100#issuecomment-1517086472 Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
This commit is contained in:
parent
2fd24d31a4
commit
1ecbeec24e
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
|
"attachments": {},
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "683953b3",
|
"id": "683953b3",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
@ -35,7 +36,7 @@
|
|||||||
" id bigint,\n",
|
" id bigint,\n",
|
||||||
" content text,\n",
|
" content text,\n",
|
||||||
" metadata jsonb,\n",
|
" metadata jsonb,\n",
|
||||||
" -- we return matched vectors to allow to execute maximal marginal relevance searches\n",
|
" -- we return matched vectors to enable maximal marginal relevance searches\n",
|
||||||
" embedding vector(1536),\n",
|
" embedding vector(1536),\n",
|
||||||
" similarity float)\n",
|
" similarity float)\n",
|
||||||
" LANGUAGE plpgsql\n",
|
" LANGUAGE plpgsql\n",
|
||||||
@ -48,11 +49,11 @@
|
|||||||
" content,\n",
|
" content,\n",
|
||||||
" metadata,\n",
|
" metadata,\n",
|
||||||
" embedding,\n",
|
" embedding,\n",
|
||||||
" 1 -(docstore.embedding <=> query_embedding) AS similarity\n",
|
" 1 -(documents.embedding <=> query_embedding) AS similarity\n",
|
||||||
" FROM\n",
|
" FROM\n",
|
||||||
" docstore\n",
|
" documents\n",
|
||||||
" ORDER BY\n",
|
" ORDER BY\n",
|
||||||
" docstore.embedding <=> query_embedding\n",
|
" documents.embedding <=> query_embedding\n",
|
||||||
" LIMIT match_count;\n",
|
" LIMIT match_count;\n",
|
||||||
" END;\n",
|
" END;\n",
|
||||||
" $$;\n",
|
" $$;\n",
|
||||||
@ -390,7 +391,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.1"
|
"version": "3.11.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
Loading…
Reference in New Issue
Block a user