executor

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor[T any] interface {
	Run(context.Context, RunCommand[T]) error
}

type Local

type Local[T any] struct {
	// contains filtered or unexported fields
}

func NewLocal added in v0.0.13

func NewLocal[T any](broker pubsub.Broker[T]) *Local[T]

func (*Local[T]) Run

func (l *Local[T]) Run(ctx context.Context, command RunCommand[T]) error

type RunCommand

type RunCommand[T any] struct {
	ID                uuid.UUID
	Agent             bubo.Agent
	Thread            *runstate.Aggregator
	ResponseSchema    *jsonschema.Schema
	UnmarshalResponse func([]byte) (T, error)
	Stream            bool
	MaxTurns          int
	ContextVariables  types.ContextVars
	Hook              pubsub.Hook[T]
}

func NewRunCommand

func NewRunCommand[T any](agent bubo.Agent, thread *runstate.Aggregator, hook pubsub.Hook[T]) (RunCommand[T], error)

func (RunCommand[T]) WithContextVariables

func (r RunCommand[T]) WithContextVariables(contextVariables types.ContextVars) RunCommand[T]

func (RunCommand[T]) WithMaxTurns

func (r RunCommand[T]) WithMaxTurns(maxTurns int) RunCommand[T]

func (RunCommand[T]) WithStream

func (r RunCommand[T]) WithStream(stream bool) RunCommand[T]

type Temporal

type Temporal struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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