write

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooks

type Hooks struct {
	io.Writer
}

Hooks that write to the embedded Writer.

func (Hooks) AgentAction

func (h Hooks) AgentAction(_ context.Context, action llm.AgentAction)

func (Hooks) AgentFinish

func (h Hooks) AgentFinish(_ context.Context, finish llm.AgentFinish)

func (Hooks) ChainEnd

func (h Hooks) ChainEnd(_ context.Context, outputs map[string]any)

func (Hooks) ChainError

func (h Hooks) ChainError(_ context.Context, err error)

func (Hooks) ChainStart

func (h Hooks) ChainStart(_ context.Context, inputs map[string]any)

func (Hooks) ProviderError

func (h Hooks) ProviderError(_ context.Context, err error)

func (Hooks) ProviderGenerateContentEnd

func (h Hooks) ProviderGenerateContentEnd(_ context.Context, res *llm.ContentResponse)

func (Hooks) ProviderGenerateContentStart

func (h Hooks) ProviderGenerateContentStart(_ context.Context, ms []llm.Message)

func (Hooks) ProviderStart

func (h Hooks) ProviderStart(_ context.Context, prompts []string)

func (Hooks) RetrieverEnd

func (h Hooks) RetrieverEnd(_ context.Context, query string, documents []llm.Document)

func (Hooks) RetrieverStart

func (h Hooks) RetrieverStart(_ context.Context, query string)

func (Hooks) StreamingFunc

func (h Hooks) StreamingFunc(_ context.Context, chunk []byte)

func (Hooks) Text

func (h Hooks) Text(_ context.Context, text string)

func (Hooks) ToolEnd

func (h Hooks) ToolEnd(_ context.Context, output string)

func (Hooks) ToolError

func (h Hooks) ToolError(_ context.Context, err error)

func (Hooks) ToolStart

func (h Hooks) ToolStart(_ context.Context, input string)

Jump to

Keyboard shortcuts

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