webtool

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebRequest

func NewWebRequest(cfg *WebRequestConfig) (tool.CallableTool, error)

NewWebRequest creates a new web_request tool using FunctionTool.

Types

type WebRequestArgs

type WebRequestArgs struct {
	URL     string            `json:"url" jsonschema:"required,description=The URL to request"`
	Method  string            `` /* 146-byte string literal not displayed */
	Headers map[string]string `json:"headers,omitempty" jsonschema:"description=HTTP headers as key-value pairs"`
	Body    string            `json:"body,omitempty" jsonschema:"description=Request body (for POST PUT PATCH)"`
}

WebRequestArgs defines the parameters for making HTTP requests.

type WebRequestConfig

type WebRequestConfig struct {
	Timeout         time.Duration
	MaxRetries      int
	MaxRequestSize  int64
	MaxResponseSize int64
	AllowedDomains  []string
	DeniedDomains   []string
	AllowedMethods  []string
	AllowRedirects  bool
	MaxRedirects    int
	UserAgent       string
}

WebRequestConfig defines configuration for the web_request tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL