GaiZhenbiao / ChuanhuChatGPT

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.
https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT
GNU General Public License v3.0
15.16k stars 2.28k forks source link

[Bug]: 使用DALL-E3模型作图以后,再切换回gpt4进行文字交流,生成空白回复 #1011

Closed Scolism closed 8 months ago

Scolism commented 9 months ago

这个bug是否已存在现有issue了?

错误表现

11 微信图片_20231222203835

复现操作

第三方api进行操作,使用DALL-E3模型作图以后,再切换回gpt4进行文字交流,生成空白回复, 报错信息提示有json解析问题

错误日志

2023-12-22 20:28:11,609 [INFO] [models.py:39] 正在加载OpenAI模型: GPT4
2023-12-22 20:28:11,609 [INFO] [models.py:138] 模型设置为了: GPT4
2023-12-22 20:28:15,994 [INFO] [base_model.py:528] 用户louise的输入为:你好
JSON解析错误,收到的内容: {"error":{"message":"Bad Request\n (request id: 2023122220303462231090t0qgLNzc)","type":"invalid_request_error","param":"","code":2}}
Traceback (most recent call last):
  File "/www/wwwroot/cc.mio.cm/ChuanhuChatGPT/modules/models/base_model.py", line 598, in predict
    for chatbot, status_text in iter:
  File "/www/wwwroot/cc.mio.cm/ChuanhuChatGPT/modules/models/base_model.py", line 322, in stream_next_chatbot
    for partial_text in stream_iter:
  File "/www/wwwroot/cc.mio.cm/ChuanhuChatGPT/modules/models/OpenAI.py", line 46, in get_answer_stream_iter
    for i in iter:
  File "/www/wwwroot/cc.mio.cm/ChuanhuChatGPT/modules/models/OpenAI.py", line 222, in _decode_chat_response
    raise Exception(error_msg)
Exception: {"error":{"message":"Bad Request\n (request id: 2023122220303462231090t0qgLNzc)","type":"invalid_request_error","param":"","code":2}}

运行环境

帮助解决

补充说明

No response

Scolism commented 8 months ago

新版本已解决。