Compare commits
1 Commits
obs-detail
...
browser
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb3eb33e6e |
@@ -33,6 +33,8 @@ type StateDescription struct {
|
|||||||
CurrentURL string `json:"current_url"`
|
CurrentURL string `json:"current_url"`
|
||||||
PageTitle string `json:"page_title"`
|
PageTitle string `json:"page_title"`
|
||||||
PageContentDescription string `json:"page_content_description"`
|
PageContentDescription string `json:"page_content_description"`
|
||||||
|
Screenshot string `json:"screenshot"`
|
||||||
|
ScreenshotMimeType string `json:"screenshot_mime_type"` // MIME type of the screenshot (e.g., "image/png")
|
||||||
}
|
}
|
||||||
|
|
||||||
// StateHistory represents the complete history of states during agent execution
|
// StateHistory represents the complete history of states during agent execution
|
||||||
|
|||||||
@@ -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)
|
historyStr += fmt.Sprintf(" Description: %s\n\n", stateHistory.States[len(stateHistory.States)-1].PageContentDescription)
|
||||||
|
|
||||||
return types.ActionResult{
|
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
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user