Documentation
¶
Index ¶
- Constants
- func FormatRunSummary(env envs.Environment, run flows.RunSummary) string
- func NewSessionAssets(env envs.Environment, source assets.Source, migrationConfig *migrations.Config) (flows.SessionAssets, error)
- func NewStep(r flows.Run, n flows.Node, arrivedOn time.Time) flows.Step
- func ReadRunSummary(sessionAssets flows.SessionAssets, data []byte, missing assets.MissingCallback) (flows.RunSummary, error)
- type AirtimeServiceFactory
- type Builder
- func (b *Builder) Build() flows.Engine
- func (b *Builder) WithAirtimeServiceFactory(f AirtimeServiceFactory) *Builder
- func (b *Builder) WithCheckSendable(fn flows.CheckSendableCallback) *Builder
- func (b *Builder) WithClaimURN(fn flows.ClaimURNCallback) *Builder
- func (b *Builder) WithEmailServiceFactory(f EmailServiceFactory) *Builder
- func (b *Builder) WithEvaluationBudget(budget int) *Builder
- func (b *Builder) WithHTTPClient(client *http.Client) *Builder
- func (b *Builder) WithLLMPrompts(prompts map[string]*template.Template) *Builder
- func (b *Builder) WithLLMServiceFactory(f LLMServiceFactory) *Builder
- func (b *Builder) WithMaxFieldChars(max int) *Builder
- func (b *Builder) WithMaxNameChars(max int) *Builder
- func (b *Builder) WithMaxResultChars(max int) *Builder
- func (b *Builder) WithMaxSprintsPerSession(max int) *Builder
- func (b *Builder) WithMaxStepsPerSprint(max int) *Builder
- func (b *Builder) WithMaxTemplateChars(max int) *Builder
- func (b *Builder) WithWebhookLimits(maxRequestBytes, maxResponseBytes int) *Builder
- func (b *Builder) WithWebhookServiceFactory(f WebhookServiceFactory) *Builder
- type EmailServiceFactory
- type Error
- type LLMServiceFactory
- type Path
- type WebhookServiceFactory
Constants ¶
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 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) 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) WithClaimURN ¶ added in v0.263.0
func (b *Builder) WithClaimURN(fn flows.ClaimURNCallback) *Builder
WithClaimURN sets the function to use to claim a URN
func (*Builder) WithEmailServiceFactory ¶ added in v0.61.0
func (b *Builder) WithEmailServiceFactory(f EmailServiceFactory) *Builder
WithEmailServiceFactory sets the email service factory
func (*Builder) WithEvaluationBudget ¶ added in v0.284.3
WithEvaluationBudget sets the cost budget for a single expression evaluation (see excellent.NewEvaluator)
func (*Builder) WithHTTPClient ¶ added in v0.50.1
WithHTTPClient sets the HTTP client made available to services such as webhooks. The client's transport can be configured with tracing, mocking or access control as needed (see github.com/nyaruka/gocommon/httpx).
func (*Builder) WithLLMPrompts ¶ added in v0.235.0
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
WithMaxFieldChars sets the maximum number of characters allowed in a contact field value
func (*Builder) WithMaxNameChars ¶ added in v0.284.3
WithMaxNameChars sets the maximum number of characters allowed in a contact name
func (*Builder) WithMaxResultChars ¶ added in v0.190.0
WithMaxResultChars sets the maximum number of characters allowed in a result value
func (*Builder) WithMaxSprintsPerSession ¶ added in v0.252.2
WithMaxSprintsPerSession sets the maximum number of resumes allowed in a single session
func (*Builder) WithMaxStepsPerSprint ¶ added in v0.30.0
WithMaxStepsPerSprint sets the maximum number of steps allowed in a single sprint
func (*Builder) WithMaxTemplateChars ¶ added in v0.64.11
WithMaxTemplateChars sets the maximum number of characters allowed from an evaluated template
func (*Builder) WithWebhookLimits ¶ added in v0.284.3
WithWebhookLimits sets the maximum sizes in bytes of the request and response of a webhook call. A value of zero means no limit.
func (*Builder) WithWebhookServiceFactory ¶ added in v0.51.0
func (b *Builder) WithWebhookServiceFactory(f WebhookServiceFactory) *Builder
WithWebhookServiceFactory sets the webhook service factory
type EmailServiceFactory ¶ added in v0.61.0
type EmailServiceFactory func(flows.SessionAssets) (flows.EmailService, error)
EmailServiceFactory resolves a session to a email service
type LLMServiceFactory ¶ added in v0.232.1
type LLMServiceFactory func(*core.LLM) (flows.LLMService, error)
LLMServiceFactory resolves an LLM asset to to an LLM service
type WebhookServiceFactory ¶ added in v0.51.0
type WebhookServiceFactory func(flows.Engine, flows.SessionAssets) (flows.WebhookService, error)
WebhookServiceFactory resolves a session to a webhook service, using the engine's HTTP client and options