Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MaxMemories int // Maximum number of memories to retain
SimilarityThreshold float64 // Minimum similarity score for retrieval
}
Config holds configuration for semantic memory
type Memory ¶
type Memory struct {
ID string
Content string
Embedding []float64
Metadata map[string]any
Timestamp time.Time
}
Memory represents a stored piece of information
type SemanticMemory ¶
type SemanticMemory struct {
// contains filtered or unexported fields
}
SemanticMemory provides semantic storage and retrieval of information
func NewSemanticMemory ¶
func NewSemanticMemory(cfg Config) *SemanticMemory
NewSemanticMemory creates a new semantic memory instance
func (*SemanticMemory) Count ¶
func (sm *SemanticMemory) Count() int
Count returns the number of stored memories
Click to show internal directories.
Click to hide internal directories.