delete

package
v0.0.0-...-20b2a55 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTool

func NewTool(ctx context.Context, config *Config) (tool.InvokableTool, error)

Types

type Config

type Config struct {
	// Inspired by the "Requests" tool from the LangChain project, specifically the RequestsDeleteTool.
	// For more details, visit: https://python.langchain.com/docs/integrations/tools/requests/
	// Optional. Default: "requests_delete".
	ToolName string `json:"tool_name"`

	// Optional. Default: A portal to the internet.
	// Use this when you need to make a DELETE request to a URL.
	// Input should be a specific url, and the output will be the text
	// response of the DELETE 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 DeleteRequest

type DeleteRequest struct {
	URL string `json:"url" jsonschema_description:"The URL to make the DELETE request"`
}

type DeleteRequestTool

type DeleteRequestTool struct {
	// contains filtered or unexported fields
}

func (*DeleteRequestTool) Delete

func (r *DeleteRequestTool) Delete(ctx context.Context, req *DeleteRequest) (string, error)

Jump to

Keyboard shortcuts

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