New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async request support for Embeddings, with initial support for OpenAI #6109
Comments
tyree731
added a commit
to tyree731/langchain
that referenced
this issue
Jun 13, 2023
This change adds support to the base `Embeddings` class for two methods, `aembed_query` and `aembed_documents`, those two methods supporting async equivalents of `embed_query` and `embed_documents` respectively. This ever so slightly rounds out async support within langchain, with an initial implementation of this functionality being implemented for openai. Implements langchain-ai#6109
hwchase17
pushed a commit
that referenced
this issue
Jun 22, 2023
Since it seems like #6111 will be blocked for a bit, I've forked @tyree731's fork and implemented the requested changes. This change adds support to the base Embeddings class for two methods, aembed_query and aembed_documents, those two methods supporting async equivalents of embed_query and embed_documents respectively. This ever so slightly rounds out async support within langchain, with an initial implementation of this functionality being implemented for openai. Implements #6109 --------- Co-authored-by: Stephen Tyree <tyree731@gmail.com>
kacperlukawski
pushed a commit
to kacperlukawski/langchain
that referenced
this issue
Jun 29, 2023
…ain-ai#6563) Since it seems like langchain-ai#6111 will be blocked for a bit, I've forked @tyree731's fork and implemented the requested changes. This change adds support to the base Embeddings class for two methods, aembed_query and aembed_documents, those two methods supporting async equivalents of embed_query and embed_documents respectively. This ever so slightly rounds out async support within langchain, with an initial implementation of this functionality being implemented for openai. Implements langchain-ai#6109 --------- Co-authored-by: Stephen Tyree <tyree731@gmail.com>
This was committed by @BrendanGraham14 and I in #6563, and released in v0.0.209. Closing. Thanks! |
aerrober
pushed a commit
to aerrober/langchain-fork
that referenced
this issue
Jul 24, 2023
…ain-ai#6563) Since it seems like langchain-ai#6111 will be blocked for a bit, I've forked @tyree731's fork and implemented the requested changes. This change adds support to the base Embeddings class for two methods, aembed_query and aembed_documents, those two methods supporting async equivalents of embed_query and embed_documents respectively. This ever so slightly rounds out async support within langchain, with an initial implementation of this functionality being implemented for openai. Implements langchain-ai#6109 --------- Co-authored-by: Stephen Tyree <tyree731@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request
The proposal here is pretty simple, we add two methods to the
Embeddings
base class,aembed_documents
andaembed_query
, allowing for async versions of the equivalent synchronous methods. The first implementation of this would be for OpenAI, since that's a popular embedding API.Motivation
async is supported within other aspects of langchain, and embeddings are one location where support isn't presently there. For a specific example, in a service my company is currently working on converting to be async, this support would improve the throughput of that support noticeably.
Your contribution
I have a PR in the works that I'll be putting up shortly.
The text was updated successfully, but these errors were encountered: