mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-18 12:40:06 +08:00
Merge branch 'master' of github.com:zhayujie/chatgpt-on-wechat
This commit is contained in:
@@ -208,7 +208,7 @@ class ChatGPTBot(Bot, OpenAIImage, OpenAICompatibleBot):
|
||||
try:
|
||||
os.remove(image_path)
|
||||
logger.debug(f"[CHATGPT] Removed temp image file: {image_path}")
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return Reply(ReplyType.TEXT, content)
|
||||
|
||||
@@ -383,7 +383,7 @@ class ClaudeAPIBot(Bot, OpenAIImage):
|
||||
try:
|
||||
error_data = json.loads(error_text)
|
||||
error_msg = error_data.get("error", {}).get("message", error_text)
|
||||
except:
|
||||
except Exception:
|
||||
error_msg = error_text or "Unknown error"
|
||||
|
||||
yield {
|
||||
|
||||
@@ -347,7 +347,7 @@ class GoogleGeminiBot(Bot):
|
||||
tool_result_data = json.loads(tool_content)
|
||||
else:
|
||||
tool_result_data = tool_content
|
||||
except:
|
||||
except Exception:
|
||||
tool_result_data = {"result": tool_content}
|
||||
|
||||
# Find the tool name from previous messages
|
||||
|
||||
@@ -617,7 +617,7 @@ def _handle_linkai_stream_response(self, base_url, headers, body):
|
||||
try:
|
||||
error_data = json.loads(error_text)
|
||||
error_msg = error_data.get("error", {}).get("message", error_text)
|
||||
except:
|
||||
except Exception:
|
||||
error_msg = error_text or "Unknown error"
|
||||
|
||||
yield {
|
||||
|
||||
Reference in New Issue
Block a user