[agent] LLM-based editing (#3985)

Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Graham Neubig <neubig@gmail.com>
This commit is contained in:
Xingyao Wang
2024-10-21 15:51:44 -05:00
committed by GitHub
parent 6fe5482b20
commit da548d308c
46 changed files with 1749 additions and 1706 deletions

View File

@@ -224,13 +224,23 @@ class AgentSession:
'Runtime must be initialized before the agent controller'
)
logger.info(
msg = (
'\n--------------------------------- OpenHands Configuration ---------------------------------\n'
f'LLM: {agent.llm.config.model}\n'
f'Base URL: {agent.llm.config.base_url}\n'
)
if agent.llm.config.draft_editor:
msg += (
f'Draft editor LLM (for file editing): {agent.llm.config.draft_editor.model}\n'
f'Draft editor LLM (for file editing) Base URL: {agent.llm.config.draft_editor.base_url}\n'
)
msg += (
f'Agent: {agent.name}\n'
f'Runtime: {self.runtime.__class__.__name__}\n'
f'Plugins: {agent.sandbox_plugins}\n'
'-------------------------------------------------------------------------------------------'
)
logger.info(msg)
self.controller = AgentController(
sid=self.sid,