Help us shape the future of Go! Take the 2026 Go Developer Survey

engine

package
v0.261.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 27 Imported by: 11

Documentation

Index

Constants

View Source
const (
	ErrorResumeNonWaitingSession int = 101
	ErrorResumeNoWaitingRun      int = 102
	ErrorResumeRejectedByWait    int = 103
)

Variables

This section is empty.

Functions

func FormatRunSummary added in v0.252.0

func FormatRunSummary(env envs.Environment, run flows.RunSummary) string

FormatRunSummary formats an instance of the RunSummary interface

func NewSessionAssets added in v0.4.0

func NewSessionAssets(env envs.Environment, source assets.Source, migrationConfig *migrations.Config) (flows.SessionAssets, error)

NewSessionAssets creates a new session assets instance with the provided base URLs

func NewStep added in v0.252.0

func NewStep(node flows.Node, arrivedOn time.Time) flows.Step

NewStep creates a new step

func ReadRunSummary added in v0.252.0

func ReadRunSummary(sessionAssets flows.SessionAssets, data []byte, missing assets.MissingCallback) (flows.RunSummary, error)

ReadRunSummary reads a run summary from the given JSON

Types

type AirtimeServiceFactory added in v0.51.0

type AirtimeServiceFactory func(flows.SessionAssets) (flows.AirtimeService, error)

AirtimeServiceFactory resolves a session to an airtime service

type Builder added in v0.27.4

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

Builder is a builder for engine configs

func NewBuilder added in v0.27.4

func NewBuilder() *Builder

NewBuilder creates a new engine builder

func (*Builder) Build added in v0.27.4

func (b *Builder) Build() flows.Engine

Build returns the final engine

func (*Builder) WithAirtimeServiceFactory added in v0.51.0

func (b *Builder) WithAirtimeServiceFactory(f AirtimeServiceFactory) *Builder

WithAirtimeServiceFactory sets the airtime service factory

func (*Builder) WithCheckSendable added in v0.257.4

func (b *Builder) WithCheckSendable(fn flows.CheckSendableCallback) *Builder

WithCheckSendable sets the function to use to determine if a message is sendable

func (*Builder) WithClassificationServiceFactory added in v0.51.0

func (b *Builder) WithClassificationServiceFactory(f ClassificationServiceFactory) *Builder

WithClassificationServiceFactory sets the NLU service factory

func (*Builder) WithEmailServiceFactory added in v0.61.0

func (b *Builder) WithEmailServiceFactory(f EmailServiceFactory) *Builder

WithEmailServiceFactory sets the email service factory

func (*Builder) WithLLMPrompts added in v0.235.0

func (b *Builder) WithLLMPrompts(prompts map[string]*template.Template) *Builder

WithLLMPrompts sets the LLM prompts to use with LLM services

func (*Builder) WithLLMServiceFactory added in v0.232.1

func (b *Builder) WithLLMServiceFactory(f LLMServiceFactory) *Builder

WithLLMServiceFactory sets the LLM service factory

func (*Builder) WithMaxFieldChars added in v0.190.0

func (b *Builder) WithMaxFieldChars(max int) *Builder

WithMaxFieldChars sets the maximum number of characters allowed in a contact field value

func (*Builder) WithMaxResultChars added in v0.190.0

func (b *Builder) WithMaxResultChars(max int) *Builder

WithMaxResultChars sets the maximum number of characters allowed in a result value

func (*Builder) WithMaxSprintsPerSession added in v0.252.2

func (b *Builder) WithMaxSprintsPerSession(max int) *Builder

WithMaxSprintsPerSession sets the maximum number of resumes allowed in a single session

func (*Builder) WithMaxStepsPerSprint added in v0.30.0

func (b *Builder) WithMaxStepsPerSprint(max int) *Builder

WithMaxStepsPerSprint sets the maximum number of steps allowed in a single sprint

func (*Builder) WithMaxTemplateChars added in v0.64.11

func (b *Builder) WithMaxTemplateChars(max int) *Builder

WithMaxTemplateChars sets the maximum number of characters allowed from an evaluated template

func (*Builder) WithWebhookServiceFactory added in v0.51.0

func (b *Builder) WithWebhookServiceFactory(f WebhookServiceFactory) *Builder

WithWebhookServiceFactory sets the webhook service factory

type ClassificationServiceFactory added in v0.51.0

type ClassificationServiceFactory func(*flows.Classifier) (flows.ClassificationService, error)

ClassificationServiceFactory resolves a session and classifier to an NLU service

type EmailServiceFactory added in v0.61.0

type EmailServiceFactory func(flows.SessionAssets) (flows.EmailService, error)

EmailServiceFactory resolves a session to a email service

type Error added in v0.154.0

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

func (*Error) Code added in v0.154.0

func (e *Error) Code() int

func (*Error) Error added in v0.154.0

func (e *Error) Error() string

type LLMServiceFactory added in v0.232.1

type LLMServiceFactory func(*flows.LLM) (flows.LLMService, error)

LLMServiceFactory resolves an LLM asset to to an LLM service

type Path added in v0.252.0

type Path []flows.Step

Path is the steps taken in a run

func (Path) ToXValue added in v0.252.0

func (p Path) ToXValue(env envs.Environment) types.XValue

ToXValue returns a representation of this object for use in expressions

type WebhookServiceFactory added in v0.51.0

type WebhookServiceFactory func(flows.SessionAssets) (flows.WebhookService, error)

WebhookServiceFactory resolves a session to a webhook service

Jump to

Keyboard shortcuts

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