custom

package
v0.0.0-...-d758db0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecTool

func NewExecTool(name string, cfg config.Tool) (tool.InvokableTool, error)

NewExecTool creates execution tool

func NewHTTPTool

func NewHTTPTool(name string, cfg config.Tool) (tool.InvokableTool, error)

NewHTTPTool creates HTTP tool

Types

type ExecConfig

type ExecConfig struct {
	Cmd     string            `yaml:"cmd"`     // Execution command template
	WorkDir string            `yaml:"workdir"` // Working directory
	Env     map[string]string `yaml:"env"`     // Environment variables
	Timeout int               `yaml:"timeout"` // Timeout in seconds
}

ExecConfig execution tool configuration structure

type ExecTool

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

ExecTool execution tool implementation

func (*ExecTool) Info

func (e *ExecTool) Info(ctx context.Context) (*schema.ToolInfo, error)

Info gets tool information

func (*ExecTool) InvokableRun

func (e *ExecTool) InvokableRun(ctx context.Context, argumentsInJSON string, opts ...tool.Option) (string, error)

InvokableRun implements InvokableTool interface

type HTTPConfig

type HTTPConfig struct {
	URL     string            `yaml:"url"`     // Request URL template
	Method  string            `yaml:"method"`  // HTTP method
	Headers map[string]string `yaml:"headers"` // Request headers
	Body    string            `yaml:"body"`    // Request body template
	Timeout int               `yaml:"timeout"` // Timeout in seconds
}

HTTPConfig HTTP tool configuration structure

type HTTPTool

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

HTTPTool HTTP tool implementation

func (*HTTPTool) Info

func (h *HTTPTool) Info(ctx context.Context) (*schema.ToolInfo, error)

Info gets tool information

func (*HTTPTool) InvokableRun

func (h *HTTPTool) InvokableRun(ctx context.Context, argumentsInJSON string, opts ...tool.Option) (string, error)

InvokableRun implements InvokableTool interface

Jump to

Keyboard shortcuts

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