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 RequestsPutTool.
// For more details, visit: https://python.langchain.com/docs/integrations/tools/requests/
// Optional. Default: "requests_put".
ToolName string `json:"tool_name"`
// Optional. Default:Use this when you want to PUT to a website.
// Input should be a JSON string with two keys: "url" and "body".
// The value of "url" should be a string, and the value of "body" should be a dictionary of
// key-value pairs you want to PUT to the URL.
// Be careful to always use double quotes for strings in the JSON string.
// The output will be the text response of the PUT 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 PutRequest ¶
type PutRequestTool ¶
type PutRequestTool struct {
// contains filtered or unexported fields
}
func (*PutRequestTool) Put ¶
func (r *PutRequestTool) Put(ctx context.Context, req *PutRequest) (string, error)
Click to show internal directories.
Click to hide internal directories.