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

refactor(demo): Only load tiktoken encoding on Matrix init #29312

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Feb 27, 2025

Problem

Currently we always load the encoding used by GPT-4o via tiktoken in Django. If there is a problem getting that encoding, this can result in a startup error, like this. However, we ONLY need this encoding when creating demo data.

Changes

Moved tiktoken usage fully into the Matrix class, so that we don't do anything at the top level.

@Twixes Twixes requested a review from benjackwhite February 27, 2025 16:11
@Twixes Twixes enabled auto-merge (squash) February 27, 2025 23:01
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