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

feat(embeddings-builder): Add max token limit checking when creating emebeddings #84

Open
1 task
marieaurore123 opened this issue Oct 30, 2024 · 0 comments
Assignees

Comments

@marieaurore123
Copy link
Contributor

  • I have looked for existing issues (including closed) about this

See branch: `fix(embeddings)/tiktoken``

Feature Request

Check the number of tokens in a payload before making a request to a provider to create embeddings.

Motivation

rig embeddings builder erroring out when the number of tokens in a request exceeds the limit. currently, rig checks that the number of documents doesn't exceed the limit but not the number of tokens.

Proposal

Use the tiktoken-rs library to validate the number of tokens. If the number f tokens exceeds the limit, split up the request into multiple requests.

Alternatives

@marieaurore123 marieaurore123 self-assigned this Oct 30, 2024
@marieaurore123 marieaurore123 changed the title feat: Add max token limit checking when creating emebeddings feat(embeddings builder): Add max token limit checking when creating emebeddings Nov 4, 2024
@mateobelanger mateobelanger modified the milestone: v0.5 Nov 12, 2024
@0xMochan 0xMochan changed the title feat(embeddings builder): Add max token limit checking when creating emebeddings feat(embeddings-builder): Add max token limit checking when creating emebeddings Dec 12, 2024
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

No branches or pull requests

2 participants