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

tiktoken error on AWS lambda #198

Open
vicky141998 opened this issue Sep 21, 2023 · 5 comments
Open

tiktoken error on AWS lambda #198

vicky141998 opened this issue Sep 21, 2023 · 5 comments

Comments

@vicky141998
Copy link

I am using tiktoken in my project but when I deployed my project into AWS lambda I got the below error.
Unknown encoding cl100k_base. Plugins found: ['tiktoken_ext.pycache', 'tiktoken_ext.openai_public']. how to solve this

@dtschleckser
Copy link

How is your Lambda layer set up? This looks like it could be an issue with your layer packaging & the way tiktoken scans for encodings. Can you try checking tiktoken_ext/openai_public to make sure ENCODING_CONSTRUCTORS is present and defines cl100k_base as you expect?

@vicky141998
Copy link
Author

vicky141998 commented Sep 26, 2023 via email

@azmathr
Copy link

azmathr commented Feb 14, 2024

Did you fix it? Same issue

@vicky141998
Copy link
Author

vicky141998 commented Feb 14, 2024 via email

@azmathr
Copy link

azmathr commented Feb 15, 2024

@dtschleckser I get error in lambda while deploying through zappa

File "/var/task/summaryserver.py", line 13, in <module>
   encoding = tiktoken.get_encoding("cl100k_base")
 File "/var/task/tiktoken/registry.py", line 64, in get_encoding
   _find_constructors()
 File "/var/task/tiktoken/registry.py", line 44, in _find_constructors

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

3 participants