Spaces:
Paused
Paused
Upload 4 files
Browse files233 unmodified lines234235236237238239240241242233 unmodified lineselif isinstance(error, generation_types.BlockedPromptException):try:full_reason_str = error.args[0]if full_reason_str.startswith("block_reason:"):block_reason_str = full_reason_str.split(":", 1)[1].strip()if block_reason_str == "SAFETY":logger.warning(f"提示因安全原因被阻止")233 unmodified lines234235236237238239240241242243244233 unmodified lineselif isinstance(error, generation_types.BlockedPromptException):try:full_reason_str = str(error.args[0])if "block_reason:" in full_reason_str:start_index = full_reason_str.find("block_reason:") + len("block_reason:")block_reason_str = full_reason_str[start_index:].strip()if block_reason_str == "SAFETY":logger.warning(f"提示因安全原因被阻止")
app.py+5-3