Skip to content

πŸ™Œ OpenHands: AI-Driven Development

change top_p default value to 1.0 (#3983)

Xingyao Wang402a03cb9a07
diff --git a/agenthub/codeact_agent/codeact_agent.py b/agenthub/codeact_agent/codeact_agent.py
index 2471fd8206..72f4ce0611 100644
--- a/agenthub/codeact_agent/codeact_agent.py
+++ b/agenthub/codeact_agent/codeact_agent.py
@@ -204,7 +204,6 @@ class CodeActAgent(Agent):
'</execute_bash>',
'</execute_browse>',
],
- 'temperature': 0.0,
}
if self.llm.is_caching_prompt_active():
diff --git a/config.template.toml b/config.template.toml
index 3bae7e228f..663c81c467 100644
--- a/config.template.toml
+++ b/config.template.toml
@@ -159,7 +159,7 @@ model = "gpt-4o"
#timeout = 0
# Top p for the API
-#top_p = 0.5
+#top_p = 1.0
# If model is vision capable, this option allows to disable image processing (useful for cost reduction).
#disable_vision = true
diff --git a/openhands/core/config.py b/openhands/core/config.py
index a4ed49a9c1..b561945b5a 100644
--- a/openhands/core/config.py
+++ b/openhands/core/config.py
@@ -71,8 +71,8 @@ class LLMConfig:
retry_max_wait: int = 120
timeout: int | None = None
max_message_chars: int = 10_000 # maximum number of characters in an observation's content when sent to the llm
- temperature: float = 0
- top_p: float = 0.5
+ temperature: float = 0.0
+ top_p: float = 1.0
custom_llm_provider: str | None = None
max_input_tokens: int | None = None
max_output_tokens: int | None = None