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

ENCODER = tiktoken.encoding_for_model(model_name) tiktoken openai? #489

Open
kyre-99 opened this issue Dec 19, 2024 · 0 comments
Open

Comments

@kyre-99
Copy link

kyre-99 commented Dec 19, 2024

Actually, I want to try the local HF model, but according to the sample code, an error will be reported
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) I looked carefully,
def encode_string_by_tiktoken(content: str, model_name: str = "gpt-4o"):
global ENCODER
if ENCODER is None:
ENCODER = tiktoken.encoding_for_model(model_name)
Will chunking call openai? this make me confused,can you tell me why? and how to use local-noly models? thank you

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

1 participant