Help us shape the future of Go! Take the 2026 Go Developer Survey

structured

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain[TInput, TOutput any] struct {
	PromptBuilder PromptBuilder[TInput]
	ChatModel     model.ToolCallingChatModel
	ToolInfo      *schema.ToolInfo
}

func NewChain

func NewChain[TInput, TOutput any](
	chatModel model.ToolCallingChatModel,
	promptBuilder PromptBuilder[TInput],
	toolName string,
	toolDesc string,
) (*Chain[TInput, TOutput], error)

func (*Chain[TInput, TOutput]) GetToolInfo

func (s *Chain[TInput, TOutput]) GetToolInfo() *schema.ToolInfo

func (*Chain[TInput, TOutput]) Invoke

func (s *Chain[TInput, TOutput]) Invoke(ctx context.Context, input TInput) (*TOutput, error)

func (*Chain[TInput, TOutput]) Stream

func (s *Chain[TInput, TOutput]) Stream(ctx context.Context, input TInput) (*schema.StreamReader[*TOutput], error)

type PromptBuilder

type PromptBuilder[TInput any] func(ctx context.Context, input TInput) ([]*schema.Message, error)

Jump to

Keyboard shortcuts

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