tooltypes

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentContentBlock

type AgentContentBlock = ContentBlock

AgentContentBlock represents a content block from agent tools (alias).

type AgentTextContent

type AgentTextContent = TextContent

AgentTextContent is a text content block (alias for tools package compatibility).

type AgentToolInterface

type AgentToolInterface interface {
	Name() string
	Description() string
	Label() string
	Parameters() map[string]any
	Execute(ctx context.Context, params map[string]any, onUpdate func(AgentToolResult)) (AgentToolResult, error)
}

AgentToolInterface defines the interface for agent tools. This avoids circular dependency between agent/tools and agent packages.

type AgentToolResult

type AgentToolResult struct {
	Content []ContentBlock
	Details map[string]any
	Error   error
}

AgentToolResult represents the result of an agent tool execution.

type ContentBlock

type ContentBlock interface {
	ContentType() string
}

ContentBlock represents a content block in a message.

type TextContent

type TextContent struct {
	Text string
}

TextContent represents text content.

func (TextContent) ContentType

func (t TextContent) ContentType() string

type ToolResult

type ToolResult = AgentToolResult

ToolResult is an alias for AgentToolResult (for tools package compatibility).

Jump to

Keyboard shortcuts

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