调整注释

This commit is contained in:
binary-husky 2023-08-25 13:16:18 +08:00
parent 6cc7d4ed69
commit 3f4c4ebc29

View File

@ -110,7 +110,7 @@ def generate_from_baidu_qianfan(inputs, llm_kwargs, history, system_prompt):
yield buffer
except:
if ('error_code' in dec) and ("max length" in dec['error_msg']):
raise ConnectionAbortedError(dec['error_msg'])
raise ConnectionAbortedError(dec['error_msg']) # 上下文太长导致 token 溢出
elif ('error_code' in dec):
raise RuntimeError(dec['error_msg'])