mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
fix(modelmgr): 使用异步请求时的异常类型丢失
This commit is contained in:
parent
8447b73fcb
commit
ffa4b1b4a1
|
@ -69,7 +69,7 @@ class ModelRequest:
|
|||
self.error_info = "{}\n该错误可能是由于http_proxy格式设置错误引起的"
|
||||
except Exception as e:
|
||||
self.error_info = "{}\n由于请求异常产生的未知错误,请查看日志".format(e)
|
||||
raise Exception(self.error_info)
|
||||
raise type(e)(self.error_info)
|
||||
|
||||
def request(self, **kwargs):
|
||||
"""向接口发起请求"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user