Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Safety Check issue if empty message

Clémence Lesnéf0f744c1d6e7
diff --git a/helpers/llm.py b/helpers/llm.py
index 5491169..5cd096f 100644
--- a/helpers/llm.py
+++ b/helpers/llm.py
@@ -170,6 +170,8 @@ async def safety_check(text: str) -> bool:
Text can be returned both safe and censored, before containing unsafe content.
"""
+ if not text:
+ return True
try:
res = await _contentsafety_analysis(text)
except HttpResponseError as e: