From 402a03cb9a07df338aae682ac0833523820c5dc6 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Sat, 21 Sep 2024 13:00:18 -0500 Subject: [PATCH] change top_p default value to 1.0 (#3983) --- agenthub/codeact_agent/codeact_agent.py | 1 - config.template.toml | 2 +- openhands/core/config.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) 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): '', '', ], - '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