Documentation
¶
Index ¶
- Variables
- func OmittedNote(size int) string
- func RoundItemBudget(config api.ThreadConfig, model api.Model) int
- type Compaction
- type CompactionCause
- type Replay
- func (r Replay) ApplyCompaction(c Compaction, content api.Indexed[api.Content], usage api.EventUsage) error
- func (r Replay) CanCompact() bool
- func (r Replay) CompactionFailed()
- func (r Replay) Create() (bool, error)
- func (r Replay) IsLoaded() bool
- func (r Replay) IsPending() bool
- func (r Replay) IsRetriable() bool
- func (r Replay) Load() error
- func (r Replay) Name() string
- func (r Replay) NeedCompaction() CompactionCause
- func (r Replay) PrepareCompaction(force bool, chunk int) (Compaction, []api.Message, error)
- func (r Replay) Record(origin api.RoundID, kind string, attrs map[string]any, data any) error
- func (r Replay) Rename(name string) error
- func (r Replay) Retry() (api.Round, api.RoundID, []api.Message, error)
- func (r Replay) Rewind(end api.RoundID, input api.Input) (api.Round, []api.Message, []string, error)
- func (r Replay) RoundAbort(usage api.EventUsage, content api.Indexed[api.Content]) error
- func (r Replay) RoundError(err error, usage api.EventUsage, content api.Indexed[api.Content]) error
- func (r Replay) RoundInit(input api.Input) (api.Round, []api.Message, error)
- func (r Replay) RoundOk(usage api.EventUsage, content api.Indexed[api.Content]) (api.RoundID, error)
- func (r Replay) RoundRefuse(usage api.EventUsage, content api.Indexed[api.Content]) error
- func (r Replay) RoundReject(code api.ErrCode, usage api.EventUsage, content api.Indexed[api.Content]) error
- func (r Replay) RoundResult(results map[string]api.ContentToolResult) error
- func (r Replay) Tighten() bool
- func (r Replay) Usage() api.EventUsage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptySummary = errors.New("compaction response carries no text")
Functions ¶
func OmittedNote ¶
func RoundItemBudget ¶
func RoundItemBudget(config api.ThreadConfig, model api.Model) int
Types ¶
type Compaction ¶
type Compaction struct {
Target api.RoundID
Tail api.RoundID
// contains filtered or unexported fields
}
func (Compaction) Half ¶
func (c Compaction) Half() int
type CompactionCause ¶
type CompactionCause int
const ( CompactionNone CompactionCause = iota CompactionTokens CompactionBytes )
type Replay ¶
type Replay = *replay
func (Replay) ApplyCompaction ¶
func (r Replay) ApplyCompaction(c Compaction, content api.Indexed[api.Content], usage api.EventUsage) error
func (Replay) CanCompact ¶
func (Replay) CompactionFailed ¶
func (r Replay) CompactionFailed()
func (Replay) IsRetriable ¶
func (Replay) NeedCompaction ¶
func (r Replay) NeedCompaction() CompactionCause
func (Replay) PrepareCompaction ¶
func (Replay) RoundAbort ¶
func (Replay) RoundError ¶
func (Replay) RoundRefuse ¶
func (Replay) RoundReject ¶
func (Replay) RoundResult ¶
func (r Replay) RoundResult(results map[string]api.ContentToolResult) error
func (Replay) Usage ¶
func (r Replay) Usage() api.EventUsage
Click to show internal directories.
Click to hide internal directories.