Fix unbound response var exception in agent safety checker

This commit is contained in:
Debanjum
2025-11-16 23:26:28 -08:00
parent 748a4f9941
commit 895af42039

View File

@@ -324,6 +324,7 @@ async def acheck_if_safe_prompt(system_prompt: str, user: KhojUser = None, lax:
safe: bool
reason: Optional[str] = ""
response = None
with timer("Chat actor: Check if safe prompt", logger):
try:
response = await send_message_to_model_wrapper(