server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition[Dependencies any] struct {
	Name         string
	Title        string
	Instructions string

	ToolsProvider func(toolProviderResources ToolProviderResources[Dependencies]) []Tool
}

type HandlerForToolWithStructuredContentOutput

type HandlerForToolWithStructuredContentOutput[ToolInput, ToolOutput any] func(ctx context.Context, request *tools.CallRequest, inputs ToolInput) (ToolOutput, i18n.Error)

type HandlerForToolWithUnstructuredContentOutput

type HandlerForToolWithUnstructuredContentOutput[ToolInput any] func(ctx context.Context, request *tools.CallRequest, inputs ToolInput) (tools.RichContent, i18n.Error)

type Server

type Server[Dependencies any] struct {
	// contains filtered or unexported fields
}

func New

func New[Dependencies any](thisDefinition Definition[Dependencies]) *Server[Dependencies]

func (*Server[Dependencies]) StartAndWaitForCompletion

func (s *Server[Dependencies]) StartAndWaitForCompletion(ctx context.Context) int

type Tool

type Tool interface {
	// contains filtered or unexported methods
}

type ToolProviderResources

type ToolProviderResources[Dependencies any] struct{}

type ToolWithStructuredContentOutput

type ToolWithStructuredContentOutput[ToolInput, ToolOutput any] struct {
	// contains filtered or unexported fields
}

func NewToolWithStructuredContentOutput

func NewToolWithStructuredContentOutput[ToolInput, ToolOutput any](definition tools.Definition, handler HandlerForToolWithStructuredContentOutput[ToolInput, ToolOutput]) *ToolWithStructuredContentOutput[ToolInput, ToolOutput]

type ToolWithUnstructuredContentOutput

type ToolWithUnstructuredContentOutput[ToolInput any] struct {
	// contains filtered or unexported fields
}

func NewToolWithUnstructuredContentOutput

func NewToolWithUnstructuredContentOutput[ToolInput any](definition tools.Definition, handler HandlerForToolWithUnstructuredContentOutput[ToolInput]) *ToolWithUnstructuredContentOutput[ToolInput]

Jump to

Keyboard shortcuts

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