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报错无法回复信息 #100

Open
Ethan-Ming opened this issue Jan 24, 2024 · 1 comment
Open

tiktoken报错无法回复信息 #100

Ethan-Ming opened this issue Jan 24, 2024 · 1 comment

Comments

@Ethan-Ming
Copy link

python 3.10
powershell
管理员权限

debug my program, here is powershell output log of my python program:
晚上好 From: wxid_(privcy mask) To: wxid_(privcy mask) 'type': 1
ask:晚上好
Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\multithread\threads.py", line 23, in run
item.play()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\basic\task.py", line 69, in play
self.reply += self.bot.ask(prompt=self.prompt, access_internet=self.access,
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 188, in ask
self.__truncate_conversation()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 110, in __truncate_conversation
if (self.__get_token_count() > self.max_tokens) and (len(self.conversation) > 1):
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 92, in __get_token_count
encoding = tiktoken.encoding_for_model(self.engine)
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model
return get_encoding(encoding_name)
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\registry.py", line 63, in get_encoding
enc = Encoding(**constructor())
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base
mergeable_ranks = load_tiktoken_bpe(
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe
return {
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in
return {
ValueError: not enough values to unpack (expected 2, got 1)

@SnapdragonLee
Copy link
Owner

您可以提供一下您的包版本和运行环境吗

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

2 participants