You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community
Andreas Motl 3613d8a2ad
community[patch]: Use SQLAlchemy's `bulk_save_objects` method to improve insert performance (#16244)
- **Description:** Improve [pgvector vector store
adapter](https://github.com/langchain-ai/langchain/blob/v0.1.1/libs/community/langchain_community/vectorstores/pgvector.py)
to save embeddings in batches, to improve its performance.
  - **Issue:** NA
  - **Dependencies:** NA
  - **References:** https://github.com/crate-workbench/langchain/pull/1


Hi again from the CrateDB team,

following up on GH-16243, this is another minor patch to the pgvector
vector store adapter. Inserting embeddings in batches, using
[SQLAlchemy's
`bulk_save_objects`](https://docs.sqlalchemy.org/en/20/orm/session_api.html#sqlalchemy.orm.Session.bulk_save_objects)
method, can deliver substantial performance gains.

With kind regards,
Andreas.

NB: As I am seeing just now that this method is a legacy feature of SA
2.0, it will need to be reworked on a future iteration. However, it is
not deprecated yet, and I haven't been able to come up with a different
implementation, yet.
8 months ago
..
langchain_community community[patch]: Use SQLAlchemy's `bulk_save_objects` method to improve insert performance (#16244) 8 months ago
scripts infra: import checking bugfix (#14569) 10 months ago
tests infra: Use dotenv in langchain-community's integration tests (#16137) 8 months ago
Makefile create mypy cache dir if it doesn't exist (#14579) 9 months ago
README.md Batch update of alt text and title attributes for images in md/mdx files across repo (#15357) 8 months ago
_test_minimum_requirements.txt community[patch]: core min 0.1.9 (#15974) 8 months ago
poetry.lock community[patch]: release 0.0.13 (#16087) 8 months ago
pyproject.toml community[patch]: release 0.0.13 (#16087) 8 months ago

README.md

🦜🧑‍🤝‍🧑 LangChain Community

Downloads License: MIT

Quick Install

pip install langchain-community

What is it?

LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.

For full documentation see the API reference.

Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.

📕 Releases & Versioning

langchain-community is currently on version 0.0.x

All changes will be accompanied by a patch version increase.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.