Skip to content

Commit

Permalink
docs: Update VectorStoreTabs.js (#28916)
Browse files Browse the repository at this point in the history
- Title: Fix typo to correct "embedding" to "embeddings" in PGVector
initialization example

- Problem: There is a typo in the example code for initializing the
PGVector class. The current parameter "embedding" is incorrect as the
class expects "embeddings".

- Correction: The corrected code snippet is:

vector_store = PGVector(
    embeddings=embeddings,
    collection_name="my_docs",
    connection="postgresql+psycopg://...",
)
  • Loading branch information
bongsang authored Dec 26, 2024
1 parent 8db2338 commit 0fd4a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/theme/VectorStoreTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function VectorStoreTabs(props) {
{
value: "PGVector",
label: "PGVector",
text: `from langchain_postgres import PGVector\n${useFakeEmbeddings ? fakeEmbeddingsString : ""}\n${vectorStoreVarName} = PGVector(\n embedding=embeddings,\n collection_name="my_docs",\n connection="postgresql+psycopg://...",\n)`,
text: `from langchain_postgres import PGVector\n${useFakeEmbeddings ? fakeEmbeddingsString : ""}\n${vectorStoreVarName} = PGVector(\n embeddings=embeddings,\n collection_name="my_docs",\n connection="postgresql+psycopg://...",\n)`,
packageName: "langchain-postgres",
default: false,
},
Expand Down

0 comments on commit 0fd4a68

Please sign in to comment.