Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Inspired by the "Requests" tool from the LangChain project, specifically the RequestsGetTool.
// For more details, visit: https://python.langchain.com/docs/integrations/tools/requests/
// Optional. Default: "request_get".
ToolName string `json:"tool_name"`
// Optional. Default: "A portal to the internet. Use this tool when you need to fetch specific content from a website.
// Input should be a URL (e.g., https://www.google.com). The output will be the text response from the GET request."
ToolDesc string `json:"tool_desc"`
// Optional.
// Headers is a map of HTTP header names to their corresponding values.
// These headers will be included in every request made by the tool.
Headers map[string]string `json:"headers"`
// Optional.
// HttpClient is the HTTP client used to perform the requests.
// If not provided, a default client with a 30-second timeout and a standard transport
// will be initialized and used.
HttpClient *http.Client
}
type GetRequest ¶
type GetRequest struct {
URL string `json:"url" jsonschema_description:"The URL to make the GET request"`
}
type GetRequestTool ¶
type GetRequestTool struct {
// contains filtered or unexported fields
}
func (*GetRequestTool) Get ¶
func (r *GetRequestTool) Get(ctx context.Context, req *GetRequest) (string, error)
Click to show internal directories.
Click to hide internal directories.