Documentation
¶
Index ¶
- Constants
- type Input
- type Option
- type SearchRequest
- type SearchResult
- type Service
- func (s *Service) Add(ctx context.Context, input Input) (string, error)
- func (s *Service) AddBatch(ctx context.Context, inputs []Input) (int, error)
- func (s *Service) Delete(ctx context.Context, agentName, userID string) error
- func (s *Service) List(ctx context.Context, agentName, userID string) ([]database.Memory, error)
- func (s *Service) Search(ctx context.Context, request SearchRequest) ([]SearchResult, error)
- type Store
Constants ¶
View Source
const ( VectorDimension = 768 MaxBatchSize = 50 DefaultTTLDays = 15 DefaultSearchLimit = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SearchRequest ¶
type SearchResult ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Search ¶
func (s *Service) Search(ctx context.Context, request SearchRequest) ([]SearchResult, error)
type Store ¶
type Store interface {
StoreAgentMemory(context.Context, *database.Memory) error
StoreAgentMemories(context.Context, []*database.Memory) error
SearchAgentMemory(context.Context, string, string, pgvector.Vector, int) ([]database.AgentMemorySearchResult, error)
ListAgentMemories(context.Context, string, string) ([]database.Memory, error)
DeleteAgentMemory(context.Context, string, string) error
}
Click to show internal directories.
Click to hide internal directories.