event

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Noop

func Noop(Event)

Noop 供无事件消费时使用。

Types

type Event

type Event struct {
	Type      EventType
	Timestamp time.Time
	Iteration int
	Data      any
}

Event 只做观察(含流式 chunk),不用于修改状态——修改状态是 Hook 的职责。

func (Event) String

func (e Event) String() string

type EventType

type EventType string
const (
	EventLoopStart    EventType = "loop_start"
	EventLoopEnd      EventType = "loop_end"
	EventModelStart   EventType = "model_start"
	EventModelChunk   EventType = "model_chunk"
	EventModelEnd     EventType = "model_end"
	EventToolStart    EventType = "tool_start"
	EventToolEnd      EventType = "tool_end"
	EventIterationEnd EventType = "iteration_end"
	EventError        EventType = "error"
)

type OnEvent

type OnEvent func(Event)

Jump to

Keyboard shortcuts

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