oodaflow

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowRegistry

type FlowRegistry struct {
	// contains filtered or unexported fields
}

func NewFlowRegistry

func NewFlowRegistry(g *genkit.Genkit) *FlowRegistry

func (*FlowRegistry) Get

func (r *FlowRegistry) Get(name string) (*OODAFlow, bool)

func (*FlowRegistry) Register

func (r *FlowRegistry) Register(name string, flow *OODAFlow)

func (*FlowRegistry) RegisterAndDefine

func (r *FlowRegistry) RegisterAndDefine(name string, flow *OODAFlow)

func (*FlowRegistry) Run

func (r *FlowRegistry) Run(ctx context.Context, name string, input *OODAFlowInput) (*OODAFlowOutput, error)

type OODAExecutor

type OODAExecutor struct {
	// contains filtered or unexported fields
}

func NewOODAExecutor

func NewOODAExecutor(cfg *OODAExecutorConfig) *OODAExecutor

func (*OODAExecutor) Execute

func (e *OODAExecutor) Execute(ctx context.Context, input *OODAFlowInput) (*OODAFlowOutput, error)

func (*OODAExecutor) WithMaxRetries

func (e *OODAExecutor) WithMaxRetries(maxRetries int) *OODAExecutor

func (*OODAExecutor) WithMiddleware

func (e *OODAExecutor) WithMiddleware(mw ...ai.Middleware) *OODAExecutor

func (*OODAExecutor) WithTimeout

func (e *OODAExecutor) WithTimeout(timeout time.Duration) *OODAExecutor

type OODAExecutorConfig

type OODAExecutorConfig struct {
	MaxRetries     int
	Timeout        time.Duration
	Middleware     []ai.Middleware
	KnowledgeStore ports.KnowledgeStore
	TransientStore ports.TransientStore
}

type OODAFlow

type OODAFlow struct {
	// contains filtered or unexported fields
}

func NewOODAFlow

func NewOODAFlow(cfg *OODAFlowConfig) *OODAFlow

func (*OODAFlow) DefineFlow

func (f *OODAFlow) DefineFlow(g *genkit.Genkit, name string)

func (*OODAFlow) DefineStreamingFlow

func (f *OODAFlow) DefineStreamingFlow(g *genkit.Genkit, name string)

func (*OODAFlow) Run

func (f *OODAFlow) Run(ctx context.Context, input *OODAFlowInput) (*OODAFlowOutput, error)

type OODAFlowConfig

type OODAFlowConfig struct {
	Memory          ooda.Memory
	Brain           ooda.Brain
	Executor        ooda.Executor
	Dispatcher      *ooda.Dispatcher
	KnowledgeStore  ports.KnowledgeStore
	TransientStore  ports.TransientStore
	MaxRetries      int
	Timeout         time.Duration
	GenerateOptions []core.GenerateOption
	// ParadoxThreshold is the EAST magnitude above which cognitive paradox
	// injection is triggered. Defaults to ooda.DefaultParadoxThreshold.
	ParadoxThreshold float64
}

type OODAFlowInput

type OODAFlowInput struct {
	Input    string        `json:"input"`
	Intent   string        `json:"intent,omitempty"`
	TaskType ooda.TaskType `json:"task_type,omitempty"`
}

type OODAFlowOutput

type OODAFlowOutput struct {
	Output         string                       `json:"output"`
	Status         ooda.VerifyStatus            `json:"status"`
	PhaseDurations map[ooda.Phase]time.Duration `json:"phase_durations"`
	RetryCount     int                          `json:"retry_count"`
	AuditTrail     string                       `json:"audit_trail,omitempty"`
	Error          string                       `json:"error,omitempty"`
}

type OODAFlowWithMiddleware

type OODAFlowWithMiddleware struct {
	*OODAFlow
	// contains filtered or unexported fields
}

func NewOODAFlowWithGenkit

func NewOODAFlowWithGenkit(cfg *OODAFlowConfig, g *genkit.Genkit) *OODAFlowWithMiddleware

func (*OODAFlowWithMiddleware) Run

type OODAGenkitBridge

type OODAGenkitBridge struct {
	// contains filtered or unexported fields
}

func NewOODAGenkitBridge

func NewOODAGenkitBridge(g *genkit.Genkit, cfg *OODAFlowConfig) *OODAGenkitBridge

func (*OODAGenkitBridge) DefineOODAFlow

func (b *OODAGenkitBridge) DefineOODAFlow(name string)

func (*OODAGenkitBridge) DefineOODAStreamingFlow

func (b *OODAGenkitBridge) DefineOODAStreamingFlow(name string)

func (*OODAGenkitBridge) RunOODA

func (b *OODAGenkitBridge) RunOODA(ctx context.Context, input *OODAFlowInput) (*OODAFlowOutput, error)

Jump to

Keyboard shortcuts

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