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

Option to use TIKTOKEN_BPE_HOST environment variable for configurable BPE host URL #357

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AitBaali-Hamza-bcg
Copy link

Replaced the hardcoded URL https://openaipublic.blob.core.windows.net with the TIKTOKEN_BPE_HOST environment variable, allowing for flexibility in sourcing BPE data.

This change is particularly beneficial for environments where external access is restricted, such as private VPCs, or where organizations prefer using private/internal artifact repositories to pull dependencies. With this update, users can specify their own host URL for BPE data via TIKTOKEN_BPE_HOST, ensuring compatibility with network policies and internal infrastructure.

Additionally, it helps resolve SSL certificate verification errors like:

requests.exceptions.SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)')))

By allowing the BPE host URL to be set internally, this change supports environments using private artifact repositories, ensuring seamless access to required files without SSL-related interruptions.

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.

1 participant