We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 65b6007 + ebe32e0 commit ac4521fCopy full SHA for ac4521f
02-use-cases/beginner/callback/callbacks/after_tool_callback.py
@@ -76,6 +76,8 @@ def replace_and_log(match):
76
return f"[{pii_type}已隐藏]"
77
78
# 执行替换
79
- filtered_text = pattern.sub(replace_and_log, filtered_text)
+ filtered_text = pattern.sub(
80
+ replace_and_log, str(filtered_text) if filtered_text is not None else ""
81
+ )
82
83
return filtered_text
0 commit comments