feat(browseragent): post screenshot on slack

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-04-24 23:14:15 +02:00
parent 6a1e536ca7
commit 748f60c11e
4 changed files with 43 additions and 7 deletions

View File

@@ -10,6 +10,10 @@ import (
"github.com/sashabaranov/go-openai/jsonschema"
)
const (
MetadataBrowserAgentHistory = "browser_agent_history"
)
type BrowserAgentRunner struct {
baseURL, customActionName string
client *api.Client
@@ -62,7 +66,7 @@ func (b *BrowserAgentRunner) Run(ctx context.Context, params types.ActionParams)
return types.ActionResult{
Result: fmt.Sprintf("Browser agent completed successfully. History:\n%s", historyStr),
Metadata: map[string]interface{}{"browser_agent_history": stateHistory},
Metadata: map[string]interface{}{MetadataBrowserAgentHistory: stateHistory},
}, nil
}