mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
chore(log): better json parse (#5581)
This commit is contained in:
parent
2869d646b6
commit
c7a8dcf079
@ -101,7 +101,7 @@ class CodeActAgent(Agent):
|
||||
codeact_enable_llm_editor=self.config.codeact_enable_llm_editor,
|
||||
)
|
||||
logger.debug(
|
||||
f'TOOLS loaded for CodeActAgent: {json.dumps(self.tools, indent=2)}'
|
||||
f'TOOLS loaded for CodeActAgent: {json.dumps(self.tools, indent=2, ensure_ascii=False).replace("\\n", "\n")}'
|
||||
)
|
||||
self.prompt_manager = PromptManager(
|
||||
microagent_dir=os.path.join(os.path.dirname(__file__), 'micro')
|
||||
|
||||
@ -359,7 +359,9 @@ class LLM(RetryMixin, DebugMixin):
|
||||
# noinspection PyBroadException
|
||||
except Exception:
|
||||
pass
|
||||
logger.debug(f'Model info: {self.model_info}')
|
||||
from openhands.core.utils import json
|
||||
|
||||
logger.debug(f'Model info: {json.dumps(self.model_info, indent=2)}')
|
||||
|
||||
if self.config.model.startswith('huggingface'):
|
||||
# HF doesn't support the OpenAI default value for top_p (1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user