mirror of https://github.com/Mai-with-u/MaiBot.git
更具体的报错
parent
e97af77fc8
commit
8ba4fb60c6
|
|
@ -534,8 +534,13 @@ class GeminiClient(BaseClient):
|
|||
UnsupportedFunctionError,
|
||||
FunctionInvocationError,
|
||||
) as e:
|
||||
raise ValueError(f"工具类型错误:请检查工具选项和参数:{str(e)}") from None
|
||||
# 工具调用相关错误
|
||||
raise RespParseException(None, f"工具调用参数错误: {str(e)}") from None
|
||||
except EmptyResponseException as e:
|
||||
# 保持原始异常,便于区分“空响应”和网络异常
|
||||
raise e
|
||||
except Exception as e:
|
||||
# 其他未预料的错误,才归为网络连接类
|
||||
raise NetworkConnectionError() from e
|
||||
|
||||
if usage_record:
|
||||
|
|
|
|||
Loading…
Reference in New Issue