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]

Add None type option to GenericAPIModelConfig top_p

carlosejimenezc47054c5c806
diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py
index ff6d48c6..48ab3a6f 100644
--- a/sweagent/agent/models.py
+++ b/sweagent/agent/models.py
@@ -46,7 +46,7 @@ class GenericAPIModelConfig(PydanticBaseModel):
total_cost_limit: float = Field(default=0.0, description="Total cost limit.")
temperature: float = 1.0
"""Sampling temperature"""
- top_p: float = 1.0
+ top_p: float | None = 1.0
"""Sampling top-p"""
api_base: str | None = None
api_version: str | None = None