Move get_agent_obs_text function to browser utils and add return_all option (#9019)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Xingyao Wang
2025-06-11 00:32:38 -04:00
committed by GitHub
parent fd921a4f88
commit 9097f487a6
13 changed files with 145 additions and 85 deletions

View File

@@ -50,6 +50,7 @@ def parse_action(trace: list[TraceElement], action: Action) -> list[TraceElement
event_dict = event_to_dict(action)
args = event_dict.get('args', {})
thought = args.pop('thought', None)
function = Function(name=action.action, arguments=args)
if thought is not None:
inv_trace.append(Message(role='assistant', content=thought))