Documentation
¶
Index ¶
- Constants
- type ForgetCandidate
- type ForgetResult
- type ListParams
- type ListResult
- type MemoryService
- func (s *MemoryService) DeleteByID(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (err error)
- func (s *MemoryService) Forget(ctx context.Context, assistantID uuid.UUID, projectID uuid.UUID, ...) (result ForgetResult, err error)
- func (s *MemoryService) Get(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (repo.GetAssistantMemoryByIDRow, error)
- func (s *MemoryService) List(ctx context.Context, projectID uuid.UUID, params ListParams) (ListResult, error)
- func (s *MemoryService) Recall(ctx context.Context, assistantID uuid.UUID, organizationID string, ...) (results []RecallResult, err error)
- func (s *MemoryService) Remember(ctx context.Context, assistantID uuid.UUID, projectID uuid.UUID, ...) (result RememberResult, err error)
- type RecallResult
- type RememberResult
Constants ¶
View Source
const ( // DefaultEmbeddingModel emits 4096-d vectors natively; we truncate to // embeddingDimensions via Matryoshka so pgvector's halfvec HNSW dim cap holds. DefaultEmbeddingModel = "qwen/qwen3-embedding-8b" DefaultContradictionModel = "mistralai/mistral-medium-3-5" DefaultHalfLife = 7 * 24 * time.Hour DefaultHardCap = 5000 DefaultDedupeUpper = 0.92 DefaultDedupeLower = 0.65 DefaultForgetAmbiguityGap = 0.05 DefaultPerResultBytes = 1024 DefaultAggregateBytes = 8192 DefaultTruncationSuffix = "…" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForgetCandidate ¶
type ForgetResult ¶
type ListParams ¶
type ListResult ¶
type ListResult struct {
Memories []repo.ListAssistantMemoriesForAdminRow
}
type MemoryService ¶
type MemoryService struct {
// contains filtered or unexported fields
}
func NewMemoryService ¶
func NewMemoryService( logger *slog.Logger, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, db *pgxpool.Pool, completions openrouter.CompletionClient, auditLogger *audit.Logger, ) *MemoryService
func (*MemoryService) DeleteByID ¶
func (*MemoryService) Get ¶
func (s *MemoryService) Get(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (repo.GetAssistantMemoryByIDRow, error)
func (*MemoryService) List ¶
func (s *MemoryService) List(ctx context.Context, projectID uuid.UUID, params ListParams) (ListResult, error)
func (*MemoryService) Recall ¶
func (s *MemoryService) Recall( ctx context.Context, assistantID uuid.UUID, organizationID string, query string, limit int, tags []string, ) (results []RecallResult, err error)
Recall finds the nearest active memories for an assistant. Embedding errors degrade to an empty result so recall failure is a recall miss for the agent.
type RecallResult ¶
Click to show internal directories.
Click to hide internal directories.