Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Fix: Conditional for warning about empty template (#1137)

Kilian Lieretd7016222a9dd
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index 224870c1..4d5befa9 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -129,7 +129,7 @@ class TemplateConfig(BaseModel):
logger = get_logger("swea-config", emoji="🔧")
if self.put_demos_in_history and self.demonstration_template is not None:
logger.warning("demonstration_template is ignored when put_demos_in_history is True")
- if not self.system_template or self.instance_template:
+ if not self.system_template or not self.instance_template:
logger.warning(
"system_template/instance_template is not set, using empty string. Perhaps you were"
" overwriting the default config? See https://swe-agent.com/latest/usage/cl_tutorial/"