Documentation
¶
Index ¶
- type AddRequest
- type MemoryService
- func (s *MemoryService) Add(ctx context.Context, req AddRequest) (*domain.Memory, error)
- func (s *MemoryService) Ask(ctx context.Context, question string) (string, error)
- func (s *MemoryService) Clean(ctx context.Context) (int64, error)
- func (s *MemoryService) Delete(ctx context.Context, id string) error
- func (s *MemoryService) GetByID(ctx context.Context, id string) (*domain.Memory, error)
- func (s *MemoryService) List(ctx context.Context, filter domain.ListFilter) ([]*domain.Memory, error)
- type ReminderService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRequest ¶
type AddRequest struct {
Content string
ForLabel string
RemindExpr string // natural language, e.g. "in 30 minutes"
}
AddRequest carries all parameters for MemoryService.Add.
type MemoryService ¶
type MemoryService struct {
// contains filtered or unexported fields
}
MemoryService orchestrates memory creation and retrieval.
func NewMemoryService ¶
func NewMemoryService(store ports.StoragePort, ai ports.AIPort, timer ports.TimeParserPort) *MemoryService
func (*MemoryService) Add ¶
func (s *MemoryService) Add(ctx context.Context, req AddRequest) (*domain.Memory, error)
Add creates and persists a new memory. Embedding runs concurrently and is non-fatal — the memory saves even if Ollama is unavailable.
func (*MemoryService) List ¶
func (s *MemoryService) List(ctx context.Context, filter domain.ListFilter) ([]*domain.Memory, error)
type ReminderService ¶
type ReminderService struct {
// contains filtered or unexported fields
}
ReminderService checks for due reminders and fires notifications.
func NewReminderService ¶
func NewReminderService(store ports.StoragePort, notifier ports.NotifierPort) *ReminderService
func (*ReminderService) CheckAndFire ¶
func (s *ReminderService) CheckAndFire(ctx context.Context) error
CheckAndFire fires all reminders due before now and marks them as reminded.
Click to show internal directories.
Click to hide internal directories.