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 GitHub
parent 7a394ed1d9
commit a1bb6ed2a9

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调用超时")