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

ValueError: Unknown encoding cl100k_base #352

Open
overtimepog opened this issue Aug 12, 2024 · 4 comments
Open

ValueError: Unknown encoding cl100k_base #352

overtimepog opened this issue Aug 12, 2024 · 4 comments

Comments

@overtimepog
Copy link

overtimepog commented Aug 12, 2024

Mantella currently running for SkyrimVR (C:\Steam\steamapps\common\SkyrimVR). Mantella mod located in C:\skyrim\MadGod\mods\Mantella - Bring NPCs to Life with AI
Running Mantella with 'gpt-3.5-turbo'. The language model can be changed in MantellaSoftware/config.ini
23:37:06.756 ERROR: Error loading model. If you are using an alternative to OpenAI, please find the setting llm_api in MantellaSoftware/config.ini and follow the instructions to change this setting
23:37:06.757 ERROR: Traceback (most recent call last):
File "src\llm\openai_client.py", line 106, in init
File "tiktoken\model.py", line 75, in encoding_for_model
File "tiktoken\registry.py", line 60, in get_encoding
ValueError: Unknown encoding cl100k_base

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 21, in
File "src\setup.py", line 113, in initialise
File "src\llm\openai_client.py", line 110, in init
File "tiktoken\model.py", line 75, in encoding_for_model
File "tiktoken\registry.py", line 60, in get_encoding
ValueError: Unknown encoding cl100k_base

I have tried everything, OpenRouter and OpenAI cause this no matter what, I have no idea

@Leidtier
Copy link
Contributor

Leidtier commented Aug 12, 2024

Looks like your tiktoken registry doesn't know the encoding cl100k_base for gpt-3.5-turbo.
Similar to this issue over here openai/tiktoken#80.
As you are the very first person with this problem I expect there to be a specific issue with your system somehow... But I have no clue what it could be exactly.

Have you tried using a different model than gpt-3.5-turbo? Like the free ones from OpenRouter?

@art-from-the-machine
Copy link
Owner

@Leidtier these hidden imports mentioned in the linked issue are already included in the exe, so I'm not sure what else could be causing this!

@danniesim
Copy link

danniesim commented Aug 18, 2024

I am having the same issue. I am using Mad God Overhaul via Mode Organizer 2 (MO2). The problem seems to be caused by running Mantella in MO2's Virtual File System, as mantella.exe runs fine outside it.

@Leidtier
Copy link
Contributor

@danniesim thanks for the report and the investigation.
We had a couple of people installing MGO lately and they didn't report a problem like this...
After you ran Mantella.exe outside of the MO2-VFS and it installed everything, have you been able to run the MGO one without issues?

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

4 participants