feat: add history metadata of agent browser (#71)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-04-21 22:52:04 +02:00
committed by GitHub
parent bafd26e92c
commit ee1667d51a
2 changed files with 4 additions and 1 deletions

View File

@@ -61,7 +61,8 @@ func (b *BrowserAgentRunner) Run(ctx context.Context, params types.ActionParams)
historyStr += fmt.Sprintf(" Description: %s\n\n", stateHistory.States[len(stateHistory.States)-1].PageContentDescription)
return types.ActionResult{
Result: fmt.Sprintf("Browser agent completed successfully. History:\n%s", historyStr),
Result: fmt.Sprintf("Browser agent completed successfully. History:\n%s", historyStr),
Metadata: map[string]interface{}{"browser_agent_history": stateHistory},
}, nil
}