mirror of
https://github.com/langchain-ai/langchain-postgres.git
synced 2026-07-16 01:33:18 -04:00
Release 0.0.9 missing upsert() (and aupsert()) methods for PGVector object #45
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @a-barton on GitHub (Sep 11, 2024).
I switched from the
langchain_community.vectorstores.PGVectorimplementation to thislangchain_postgresone because I saw this implementation includes anupsert()method (very handy functionality to have).Having installed the latest release (version 0.0.9) of the

langchain-postgreslibrary though (both locally within an Ubuntu WSL disto, and also within a Docker container), I encountered an error that thePGVectorobject doesn't have anupsert()method:I checked the local files of the installed version of the library, the
vectorstores.pyfile specifically, I discovered that there indeed wasn't anyupsert()method present, despite it clearly existing in themainbranch of this GitHub repo.Was the
upsert()method not included in the latest release?@eyurtsev commented on GitHub (Sep 12, 2024):
latest release is not caught up to master.
0.0.10 will not have the upsert method. Instead
add_documentsandadd_textsimplement upsert semantics by default when you provide an ID