executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultUnmarshal added in v0.1.0

func DefaultUnmarshal[T any]() func([]byte) (T, error)

func ToJSONSchema added in v0.1.0

func ToJSONSchema[T any]() *jsonschema.Schema

Types

type CompletableFuture added in v0.1.0

type CompletableFuture[T any] interface {
	Future[T]
	Promise
}

func NewFuture added in v0.1.0

func NewFuture[T any](unmarshal func([]byte) (T, error)) CompletableFuture[T]

type Executor

type Executor interface {
	Run(context.Context, RunCommand, Promise) error
	// contains filtered or unexported methods
}

type Future added in v0.1.0

type Future[T any] interface {
	Get() (T, error)
}

type Local

type Local struct {
}

func NewLocal

func NewLocal() *Local

func (*Local) Run

func (l *Local) Run(ctx context.Context, command RunCommand, promise Promise) error

type Promise added in v0.1.0

type Promise interface {
	Complete(string)
	Error(error)
}

type RunCommand

type RunCommand struct {
	Agent            api.Owl
	Thread           *shorttermmemory.Aggregator
	ResponseSchema   *jsonschema.Schema
	Stream           bool
	MaxTurns         int
	ContextVariables types.ContextVars
	Hook             events.Hook
	// contains filtered or unexported fields
}

func NewRunCommand

func NewRunCommand(agent api.Owl, thread *shorttermmemory.Aggregator, hook events.Hook) (RunCommand, error)

func (*RunCommand) ID

func (r *RunCommand) ID() uuid.UUID

func (*RunCommand) Validate added in v0.1.0

func (r *RunCommand) Validate() error

func (RunCommand) WithContextVariables

func (r RunCommand) WithContextVariables(contextVariables types.ContextVars) RunCommand

func (RunCommand) WithMaxTurns

func (r RunCommand) WithMaxTurns(maxTurns int) RunCommand

func (RunCommand) WithStream

func (r RunCommand) WithStream(stream bool) RunCommand

type Temporal

type Temporal struct{}

Jump to

Keyboard shortcuts

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