chat

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddToHistoryStep added in v0.2.24

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

func (*AddToHistoryStep) Start added in v0.2.24

type EchoStep added in v0.2.24

type EchoStep struct {
	TimePerCharacter time.Duration
	// contains filtered or unexported fields
}

func NewEchoStep added in v0.2.24

func NewEchoStep() *EchoStep

func (*EchoStep) Interrupt added in v0.2.24

func (e *EchoStep) Interrupt()

func (*EchoStep) Publish added in v0.2.24

func (e *EchoStep) Publish(publisher message.Publisher, topic string) error

func (*EchoStep) Start added in v0.2.24

func (e *EchoStep) Start(ctx context.Context, input []*context2.Message) (steps.StepResult[string], error)

type Event added in v0.2.24

type Event struct {
	Type  EventType `json:"type"`
	Text  string    `json:"text,omitempty"`
	Error error     `json:"error,omitempty"`
}

type EventType added in v0.2.24

type EventType string
const (
	EventTypePartial   EventType = "partial"
	EventTypeFinal     EventType = "final"
	EventTypeError     EventType = "error"
	EventTypeInterrupt EventType = "interrupt"
)

type RunnableStep added in v0.2.24

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

func (*RunnableStep) Start added in v0.2.24

func (r *RunnableStep) Start(ctx context.Context, input interface{}) (steps.StepResult[string], error)

type Step

type Step interface {
	steps.Step[[]*geppetto_context.Message, string]
	Interrupt()
	Publish(publisher message.Publisher, topic string) error
}

type StepOption added in v0.2.24

type StepOption func(Step) error

func WithSubscription added in v0.2.24

func WithSubscription(publisher message.Publisher, topic string) StepOption

Jump to

Keyboard shortcuts

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