langchain-ai / langchain-postgres

LangChain abstractions backed by Postgres Backend
MIT License
133 stars 48 forks source link

fix: use self.embeddings.aembed_* in async methods #97

Closed liunux4odoo closed 2 months ago

liunux4odoo commented 3 months ago

using sync methods of embeddings in PGVector async methods harms performance.

andreped commented 3 months ago

@liunux4odoo I tested your PR branch on one of my projects, and it fixed our issue. Thanks!

This PR is needed to not break our async data pipelines - I am quite surprised this was an issue at all...

@efriis, @eyurtsev, @pprados Can some of the maintainers please review this PR?

liunux4odoo commented 3 months ago

@liunux4odoo I tested your PR branch on one of my projects, and it fixed our issue. Thanks!

This PR is needed to not break our async data pipelines - I am quite surprised this was an issue at all...

@efriis, @eyurtsev, @pprados Can some of the maintainers please review this PR?

Glad to see this helps.

liunux4odoo commented 2 months ago

So strange the tests failed, I cannot check what's wrong.