Documentation
¶
Overview ¶
Package groupingest consumes the group event log and extracts memories into group-shared and per-user drawers. It is the async counterpart of the synchronous single-chat memory path: messages are batched, sent to an Extractor (typically LLM-backed), and results are written via the existing memorywrite helpers.
Index ¶
Constants ¶
const (
PipelineMemoryIngest = "memory_ingest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
ChatMessage is a single human message ready for extraction.
type Config ¶
type Config struct {
DB *sql.DB
Q *sqlc.Queries
Extractor Extractor
UserWriter UserWriter
BatchSize int
Pipeline string
}
Config configures an Ingester.
type ExtractRequest ¶
type ExtractRequest struct {
GroupID string
Messages []ChatMessage
CurrentGroupMemory string
}
ExtractRequest is the input to an Extractor.
type ExtractResult ¶
type ExtractResult struct {
GroupMemory string // updated group memory (empty = no change)
UserFacts map[string][]string // actor_id → extracted per-user facts
}
ExtractResult is the output from an Extractor.
type Extractor ¶
type Extractor interface {
Extract(ctx context.Context, req ExtractRequest) (ExtractResult, error)
}
Extractor extracts knowledge from a batch of group messages.
type Ingester ¶
type Ingester struct {
// contains filtered or unexported fields
}
Ingester consumes group event logs and extracts memories.
func (*Ingester) ProcessGroup ¶
ProcessGroup processes a single group's pending messages. Exported for targeted invocations (e.g. after a burst of messages in one group).