Documentation ¶
Index ¶
- func StepPrinterFunc(name string, w io.Writer) func(msg *message.Message) error
- func ToTypedEvent[T any](e Event) (*T, bool)
- type AddToHistoryStep
- type EchoStep
- type Event
- type EventMetadata
- type EventPartialCompletion
- type EventText
- type EventType
- type RunnableStep
- type Step
- type StepOption
- type ToolCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StepPrinterFunc ¶ added in v0.4.1
func ToTypedEvent ¶ added in v0.4.1
Types ¶
type AddToHistoryStep ¶ added in v0.2.24
type AddToHistoryStep struct {
// contains filtered or unexported fields
}
func (*AddToHistoryStep) AddPublishedTopic ¶ added in v0.4.1
func (a *AddToHistoryStep) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*AddToHistoryStep) Start ¶ added in v0.2.24
func (a *AddToHistoryStep) Start(ctx context.Context, input string) (steps.StepResult[string], error)
type EchoStep ¶ added in v0.2.24
func NewEchoStep ¶ added in v0.2.24
func NewEchoStep() *EchoStep
func (*EchoStep) AddPublishedTopic ¶ added in v0.4.1
func (*EchoStep) Start ¶ added in v0.2.24
func (e *EchoStep) Start(ctx context.Context, input conversation.Conversation) (steps.StepResult[string], error)
type Event ¶ added in v0.2.24
type Event struct { Type EventType `json:"type"` Error error `json:"error,omitempty"` Metadata EventMetadata `json:"meta,omitempty"` Step *steps.StepMetadata `json:"step,omitempty"` // contains filtered or unexported fields }
func NewEventFromJson ¶ added in v0.4.1
func (Event) ToPartialCompletion ¶ added in v0.4.1
func (e Event) ToPartialCompletion() (EventPartialCompletion, bool)
type EventMetadata ¶ added in v0.4.1
type EventMetadata struct { ID conversation.NodeID `json:"message_id"` ParentID conversation.NodeID `json:"parent_id"` }
EventMetadata contains all the information that is passed along with watermill message, specific to chat steps.
type EventPartialCompletion ¶ added in v0.4.1
type RunnableStep ¶ added in v0.2.24
type RunnableStep struct {
// contains filtered or unexported fields
}
func (*RunnableStep) AddPublishedTopic ¶ added in v0.4.1
func (r *RunnableStep) AddPublishedTopic(publisher message.Publisher, topic string) error
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 steps.Step[conversation.Conversation, string]
type StepOption ¶ added in v0.2.24
func WithSubscription ¶ added in v0.2.24
func WithSubscription(publisher message.Publisher, topic string) StepOption
Click to show internal directories.
Click to hide internal directories.