Documentation
¶
Index ¶
- Variables
- type Attachment
- type Buffered
- func (b *Buffered) ActiveProducers() int
- func (b *Buffered) Close()
- func (b *Buffered) Closed() bool
- func (b *Buffered) Drain() []Message
- func (b *Buffered) Len() int
- func (b *Buffered) Push(msg Message) error
- func (b *Buffered) RegisterProducer(name string) *ProducerHandle
- func (b *Buffered) Wait(ctx context.Context) bool
- type Expander
- type Inbox
- type Message
- type Origin
- type Priority
- type ProducerHandle
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInboxClosed = errors.New("inbox closed") ErrInboxFull = errors.New("inbox full") )
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Buffered ¶
type Buffered struct {
// contains filtered or unexported fields
}
func NewBuffered ¶
func (*Buffered) ActiveProducers ¶
func (*Buffered) RegisterProducer ¶
func (b *Buffered) RegisterProducer(name string) *ProducerHandle
type Expander ¶
type Message ¶
type Message struct {
ChatMessage provider.ChatMessage
Origin Origin
Priority Priority
Attachments []Attachment
Meta map[string]any
CreatedAt time.Time
}
func FromChatMessage ¶
func FromChatMessage(msg provider.ChatMessage, origin Origin) Message
func NewMessage ¶
func NewSystemMessage ¶
func NewUserMessage ¶
func (Message) ToChatMessages ¶
func (m Message) ToChatMessages() []provider.ChatMessage
ToChatMessages converts an inbox Message to LLM-compatible ChatMessages. User-origin messages with no attachments pass through unchanged. All other origins get a metadata envelope so the LLM knows the source.
func (Message) WithPriority ¶
type ProducerHandle ¶
type ProducerHandle struct {
// contains filtered or unexported fields
}
func (*ProducerHandle) Done ¶
func (h *ProducerHandle) Done()
Click to show internal directories.
Click to hide internal directories.