Skip to content
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

Use embedding instead of embedding function in ElasticVectorStore #1692

Conversation

SirBernardPhilip
Copy link
Contributor

While it might be a bit more restrictive, I find that using the Embedding interface as an input for the vector store creation is better than an embedding function because we can use bulk requests and possibly the retry logic if needed.

I have seen that some vector store implementations use Embedding while others use embedding function so I don't know what is the criteria to have one or the other, in my opinion they should all just be Embedding or have a way more complex embedding function that accepts multiple texts instead of one by one.

SirBernardPhilip and others added 3 commits March 15, 2023 13:55
Instead of using a callable we use the actual embedder, this way we can actually benefit from bulk requests to the embedding APIs we might be using
@hwchase17
Copy link
Contributor

agree - thanks!

@hwchase17 hwchase17 merged commit 262d4cb into langchain-ai:master Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants