Spaces:
Paused
Paused
Upload 4 files
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ def handle_api_error(error, attempt, stream=False):
|
|
186 |
return False, None
|
187 |
|
188 |
elif isinstance(error, generation_types.StopCandidateException):
|
189 |
-
logger.warning(f"
|
190 |
switch_api_key()
|
191 |
return False, None
|
192 |
|
@@ -212,7 +212,7 @@ def chat_completions():
|
|
212 |
gemini_history, user_message, error_response = func.process_messages_for_gemini(messages)
|
213 |
|
214 |
if error_response:
|
215 |
-
logger.error(f"
|
216 |
return jsonify(error_response), 400
|
217 |
|
218 |
def do_request(current_api_key, attempt):
|
|
|
186 |
return False, None
|
187 |
|
188 |
elif isinstance(error, generation_types.StopCandidateException):
|
189 |
+
logger.warning(f"输出被截断")
|
190 |
switch_api_key()
|
191 |
return False, None
|
192 |
|
|
|
212 |
gemini_history, user_message, error_response = func.process_messages_for_gemini(messages)
|
213 |
|
214 |
if error_response:
|
215 |
+
logger.error(f"处理消息时出错↙\n {error_response}")
|
216 |
return jsonify(error_response), 400
|
217 |
|
218 |
def do_request(current_api_key, attempt):
|