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.18k stars 2.29k forks source link

Fix stop sequence initialization as empty string #1063

Closed chenditc closed 7 months ago

chenditc commented 7 months ago

作者自述

描述

修复 Bug:https://github.com/GaiZhenbiao/ChuanhuChatGPT/issues/1007

当模型初始化时,stop sequence 设置为空字符串,某些模型会在生成回复时直接停止回复,导致切换模型后失败。如果调用 set_stop_sequence 后可以 workaround。本质上是 stop sequence 的数据类型错了。

相关问题

[Bug]: 每次切换模型后回复都为空 #1007

补充信息

chenditc commented 7 months ago

在 Llama 模型上可以复现

ThorinKong commented 7 months ago

GPT4 vision现在反而不能用了,在stop没有设置的时候会报错 { "error": { "message": "3 validation errors for Request\nbody -> stop\n str type expected (type=type_error.str)\nbody -> stop\n ensure this value has at least 1 items (type=value_error.list.min_items; limit_value=1)\nbody -> stop\n ensure this value has at least 1 items (type=value_error.list.min_items; limit_value=1)", "type": "invalid_request_error", "param": null, "code": null } }

GaiZhenbiao commented 7 months ago

GPT4V修复了