Moonfanz commited on
Commit
53d5cbc
·
verified ·
1 Parent(s): 9ac5435

Upload 4 files

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -540,7 +540,10 @@ def chat_completions():
540
  # logger.info(f"AI响应处理成功↓\n{json_dumps}")
541
  if is_thinking and show_thoughts:
542
  text_content = response.thoughts + '\n' + text_content
543
- except StopCandidateException as e:
 
 
 
544
  logger.error(f"生成内容失败↙\n{e}")
545
  continue
546
 
 
540
  # logger.info(f"AI响应处理成功↓\n{json_dumps}")
541
  if is_thinking and show_thoughts:
542
  text_content = response.thoughts + '\n' + text_content
543
+ except AttributeError:
544
+ logger.error(f"生成内容失败↙\n{response}")
545
+ continue
546
+ except (StopCandidateException, BlockedPromptException) as e:
547
  logger.error(f"生成内容失败↙\n{e}")
548
  continue
549