修复get_conf接口
This commit is contained in:
@@ -120,6 +120,7 @@ def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_prompt="",
|
||||
raise ConnectionAbortedError("OpenAI拒绝了请求:" + error_msg)
|
||||
else:
|
||||
if "API key has been deactivated" in error_msg: report_invalid_key(api_key)
|
||||
elif "exceeded your current quota" in error_msg: report_invalid_key(api_key)
|
||||
raise RuntimeError("OpenAI拒绝了请求:" + error_msg)
|
||||
if ('data: [DONE]' in chunk): break # api2d 正常完成
|
||||
json_data = json.loads(chunk.lstrip('data:'))['choices'][0]
|
||||
|
||||
Reference in New Issue
Block a user