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

百度文心偶发报错336006 #1959

Closed
2 tasks done
a-Dmears opened this issue May 10, 2024 · 2 comments
Closed
2 tasks done

百度文心偶发报错336006 #1959

a-Dmears opened this issue May 10, 2024 · 2 comments

Comments

@a-Dmears
Copy link

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Docker

运行的python版本是?

python 3.10

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

No response

问题描述 😯

No response

终端日志 📒

[WARNING][2024-05-10 08:26:24][baidu_wenxin.py:94] - [BAIDU] Exception: 'result'
[ERROR][2024-05-10 08:26:24][chat_channel.py:303] - Worker return exception: 'total_tokens'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/channel/chat_channel.py", line 170, in _handle
reply = self._generate_reply(context)
File "/app/channel/chat_channel.py", line 193, in _generate_reply
reply = super().build_reply_content(context.content, context)
File "/app/channel/channel.py", line 38, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/app/bridge/bridge.py", line 74, in fetch_reply_content
return self.get_bot("chat").reply(query, context)
File "/app/bot/baidu/baidu_wenxin.py", line 41, in reply
result["total_tokens"],
KeyError: 'total_tokens'

@6vision
Copy link
Collaborator

6vision commented May 22, 2024

修复了 KeyError: 'total_tokens' 报错,336006错误码见错误码,暂时没复现,可以提供更多log信息

@6vision 6vision closed this as completed May 22, 2024
@6vision
Copy link
Collaborator

6vision commented May 22, 2024

#2012 修复了 KeyError: 'total_tokens' 报错,336006错误码见错误码,暂时没复现,可以提供更多log信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants