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

GH-1214: Batching strategy for embedding documents #1215

Closed
wants to merge 1 commit into from

Conversation

sobychacko
Copy link
Contributor

  • When embedding documents, allow batching the documents using some criteria.
  • BatchingStrategy interface with a TokenCountBatchingStrategy implementation that uses the openai max input token size of 8191 as the default.
  • Add a default method in EmbeddingModel to embed document using this new batching strategy.
  • Change MilvusVectorStore to make use of this new batching API.
  • Adding unit tests for TokenCountBatchingStrategy.
  • Adding openai integration test to call the embed API that uses batching.

Resolves #1214

 - When embedding documents, allow batching the documents using some criteria.
 - `BatchingStrategy` interface with a `TokenCountBatchingStrategy` implementation that uses
   the openai max input token size of 8191 as the default.
 - Add a default method in EmbeddingModel to embed document using this new batching strategy.
 - Change `MilvusVectorStore` to make use of this new batching API.
 - Adding unit tests for `TokenCountBatchingStrategy`.
 - Adding openai integration test to call the embed API that uses batching.

Resolves spring-projects#1214
@markpollack
Copy link
Member

merged in 949f1ed

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.

Introduce batching support for embedding documents
2 participants