From a0f73a61ea1146f5bc1a702d7a4c7e4e29cd0b3b Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:13:09 +0800 Subject: [PATCH] Update predict.py --- predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/predict.py b/predict.py index fd597d7..21b5ad6 100644 --- a/predict.py +++ b/predict.py @@ -194,7 +194,7 @@ def predict(inputs, top_p, temperature, chatbot=[], history=[], system_prompt='' chunk = get_full_error(chunk, stream_response) error_msg = chunk.decode() if "reduce the length" in error_msg: - chatbot[-1] = (history[-1], "老铁,输入的文本太长了") + chatbot[-1] = (history[-1], "输入的文本太长了,超过gpt的令牌数量限制") yield chatbot, history, "Json解析不合常规,很可能是文本过长" + error_msg return