structured

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 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 {
	// contains filtered or unexported fields
}

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