reasoner

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From[B any](f func(thinker.State[B]) (thinker.Phase, chatter.Message, error)) thinker.Reasoner[B]

From is helper to build Reasoner[A, B any] interface from pure function.

Types

type Epoch

type Epoch[B any] struct {
	thinker.Reasoner[B]
	// contains filtered or unexported fields
}

The epoch reasoner limits the number of agent iterations per step. It aborts execution if the maximum limit is reached.

func NewEpoch

func NewEpoch[B any](max int, reasoner thinker.Reasoner[B]) Epoch[B]

Creates new epoch reasoner that limits the number of agent iterations per step.

func (Epoch[B]) Deduct

func (epoch Epoch[B]) Deduct(state thinker.State[B]) (thinker.Phase, chatter.Message, error)

Deduct new goal for the agent to pursue.

type Void

type Void[B any] struct{}

The void reasoner always sets a new goal to return results.

func NewVoid

func NewVoid[B any]() *Void[B]

Creates new void reasoner that always sets a new goal to return results.

func (Void[B]) Deduct

func (Void[B]) Deduct(thinker.State[B]) (thinker.Phase, chatter.Message, error)

Deduct new goal for the agent to pursue.

func (Void[B]) Purge added in v0.0.11

func (Void[B]) Purge()

Jump to

Keyboard shortcuts

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