Update src/chat/antipromptinjector/counter_attack.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
雅诺狐
2025-10-07 11:46:18 +08:00
committed by Windpicker-owo
parent bb7f9c1730
commit 4f3ef43b49

View File

@@ -87,7 +87,7 @@ class CounterAttackGenerator:
# 调用LLM
response = await self._call_llm_with_timeout(prompt, model_config)
return response if response else self._get_fallback_response(detection_result)
return response or self._get_fallback_response(detection_result)
except asyncio.TimeoutError:
logger.error("LLM调用超时")