flow

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeExtractor

type ClaudeExtractor struct {
	Timeout time.Duration
}

func (ClaudeExtractor) Extract

func (e ClaudeExtractor) Extract(ctx context.Context, message string) (Contact, error)

type Contact

type Contact struct {
	Company string `json:"company,omitempty" jsonschema:"Company or organization"`
	Email   string `json:"email" jsonschema:"Email address"`
	Name    string `json:"name" jsonschema:"Full name"`
	Notes   string `json:"notes,omitempty" jsonschema:"Notes for the follow-up"`
}

type ContactInput

type ContactInput struct {
	MessageID int64
	Prompt    string
	ThreadID  int64
}

type Deps

type Deps struct {
	DBOS    dbos.DBOSContext
	Extract Extractor
	Log     *slog.Logger
	Publish func(threadID int64)
	Store   db.ThreadStore
	Tasks   db.TaskStore
}

type Extractor

type Extractor interface {
	Extract(ctx context.Context, message string) (Contact, error)
}

func DefaultExtractor

func DefaultExtractor() Extractor

func HeuristicExtractor

func HeuristicExtractor() Extractor

type ExtractorFunc

type ExtractorFunc func(ctx context.Context, message string) (Contact, error)

func (ExtractorFunc) Extract

func (f ExtractorFunc) Extract(ctx context.Context, message string) (Contact, error)

type Flows

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

func New

func New(deps Deps) *Flows

func (*Flows) Agent

func (f *Flows) Agent() chat.Agent

func (*Flows) Deliver

func (f *Flows) Deliver(workflowID, topic, idempotencyKey string, reply elicit.Reply) error

Jump to

Keyboard shortcuts

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