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

关于没有api_key #22

Open
foreverlong opened this issue Jul 29, 2024 · 0 comments
Open

关于没有api_key #22

foreverlong opened this issue Jul 29, 2024 · 0 comments

Comments

@foreverlong
Copy link

api_key为空会显示下面这个错误

2024-07-29 05:20:43 | stdout | 发送成功 -- | -- | -- 2024-07-29 05:20:43 | stdout | 发送的消息为:发生了未知错误Orz 2024-07-29 05:20:43 | stdout | KeyError: 'usage' 2024-07-29 05:20:43 | stdout | if 'total_tokens' in response["usage"]: 2024-07-29 05:20:43 | stdout | File "/app/chat/views.py", line 52, in get_response 2024-07-29 05:20:43 | stdout | response, tokencount = get_response(context, openAI_API_Key) 2024-07-29 05:20:43 | stdout | File "/app/chat/views.py", line 94, in chatgpt_reply 2024-07-29 05:20:43 | stdout | Traceback (most recent call last): 2024-07-29 05:20:41 | stdout | 收到了ID为6的用户的消息:12333 2024-07-29 05:20:37 | stdout | 发送成功 2024-07-29 05:20:37 | stdout | 发送的消息为:API-key已设置: 2024-07-29 05:20:37 | stdout | 收到了ID为6的用户的指令:/setapikey
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