Spaces:
Paused
Paused
binary-husky
commited on
Commit
•
7c20e79
1
Parent(s):
4a2c3ee
Update predict.py
Browse files- predict.py +1 -1
predict.py
CHANGED
@@ -194,7 +194,7 @@ def predict(inputs, top_p, temperature, chatbot=[], history=[], system_prompt=''
|
|
194 |
chunk = get_full_error(chunk, stream_response)
|
195 |
error_msg = chunk.decode()
|
196 |
if "reduce the length" in error_msg:
|
197 |
-
chatbot[-1] = (history[-1], "
|
198 |
yield chatbot, history, "Json解析不合常规,很可能是文本过长" + error_msg
|
199 |
return
|
200 |
|
|
|
194 |
chunk = get_full_error(chunk, stream_response)
|
195 |
error_msg = chunk.decode()
|
196 |
if "reduce the length" in error_msg:
|
197 |
+
chatbot[-1] = (history[-1], "输入的文本太长了,超过gpt的令牌数量限制")
|
198 |
yield chatbot, history, "Json解析不合常规,很可能是文本过长" + error_msg
|
199 |
return
|
200 |
|