Documentation
¶
Index ¶
- type Action
- type BrowserState
- type Config
- type ElementInfo
- type Param
- type ScrollInfo
- type TabInfo
- type Tool
- func (b *Tool) Cleanup()
- func (b *Tool) Execute(params *Param) (*ToolResult, error)
- func (b *Tool) GetCurrentState() (*BrowserState, error)
- func (b *Tool) Info(_ context.Context) (*schema.ToolInfo, error)
- func (b *Tool) InvokableRun(ctx context.Context, argumentsInJSON string, opts ...tool.Option) (string, error)
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
const ( ActionGoToURL Action = "go_to_url" ActionClickElement Action = "click_element" ActionInputText Action = "input_text" ActionScrollDown Action = "scroll_down" ActionScrollUp Action = "scroll_up" //ActionSendKeys Action = "send_keys" ActionWebSearch Action = "web_search" ActionWait Action = "wait" ActionExtractContent Action = "extract_content" ActionSwitchTab Action = "switch_tab" ActionOpenTab Action = "open_tab" ActionCloseTab Action = "close_tab" )
type BrowserState ¶
type Config ¶
type Config struct {
Headless bool `json:"headless"`
DisableSecurity bool `json:"disable_security"`
ExtraChromiumArgs []string `json:"extra_chromium_args"`
ChromeInstancePath string `json:"chrome_instance_path"`
ProxyServer string `json:"proxy_server"`
DDGSearchTool duckduckgo.Search
ExtractChatModel model.BaseChatModel
Logf func(string, ...any)
}
type ElementInfo ¶
type Param ¶
type Param struct {
Action Action `json:"action"`
URL *string `json:"url,omitempty"`
Index *int `json:"index,omitempty"`
Text *string `json:"text,omitempty"`
ScrollAmount *int `json:"scroll_amount,omitempty"`
TabID *int `json:"tab_id,omitempty"`
Query *string `json:"query,omitempty"`
Goal *string `json:"goal,omitempty"`
Keys *string `json:"keys,omitempty"`
Seconds *int `json:"seconds,omitempty"`
}
type ScrollInfo ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
func (*Tool) GetCurrentState ¶
func (b *Tool) GetCurrentState() (*BrowserState, error)
type ToolResult ¶
Click to show internal directories.
Click to hide internal directories.