Skip to content

Commit

Permalink
Update VectorStoreTabs.js
Browse files Browse the repository at this point in the history
- Fix Typo
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 parameter should be updated to embeddings for correct usage. The corrected code snippet is:

```
vector_store = PGVector(
    embeddings=embeddings,
    collection_name="my_docs",
    connection="postgresql+psycopg://...",
)
```
  • Loading branch information
bongsang authored Dec 25, 2024
1 parent 5991b45 commit 71d26ca
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 71d26ca

Please sign in to comment.