Documentation
¶
Index ¶
- Constants
- type GraphTraverser
- type Memory
- type MemoryRelationship
- type Project
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) CreateMemory(memory *Memory) error
- func (s *SQLiteStore) CreateProject(project *Project) error
- func (s *SQLiteStore) CreateRelationship(rel *MemoryRelationship) error
- func (s *SQLiteStore) CreateSession(session *Session) error
- func (s *SQLiteStore) GetLastSession(projectID string) (*Session, error)
- func (s *SQLiteStore) GetMemory(id string) (*Memory, error)
- func (s *SQLiteStore) GetProject(id string) (*Project, error)
- func (s *SQLiteStore) GetProjectByPath(path string) (*Project, error)
- func (s *SQLiteStore) GetRelationships(memoryID string) ([]MemoryRelationship, error)
- func (s *SQLiteStore) GetSession(id string) (*Session, error)
- func (s *SQLiteStore) UpdateSession(session *Session) error
- type Session
- type VectorSearchResult
- type WeaviateStore
- func (w *WeaviateStore) Close() error
- func (w *WeaviateStore) Delete(id string) error
- func (w *WeaviateStore) Search(embedding []float32, limit int, filterMap map[string]interface{}) ([]VectorSearchResult, error)
- func (w *WeaviateStore) Store(id string, content string, embedding []float32, ...) error
Constants ¶
const (
// MemoryClassName is the Weaviate class name for memories
MemoryClassName = "Memory"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphTraverser ¶ added in v0.2.0
type GraphTraverser struct {
// contains filtered or unexported fields
}
GraphTraverser handles memory relationship traversal
func NewGraphTraverser ¶ added in v0.2.0
func NewGraphTraverser(sqlStore *SQLiteStore) *GraphTraverser
NewGraphTraverser creates a new graph traverser
func (*GraphTraverser) ExpandMemories ¶ added in v0.2.0
func (g *GraphTraverser) ExpandMemories(seedIDs []string, depth int) ([]string, error)
ExpandMemories performs BFS traversal of memory relationships Returns additional memory IDs to include, up to the specified depth
type Memory ¶
type Memory struct {
ID string
ProjectID string
SessionID *string
Content string
Importance float64
ContextType *string
TemporalRelevance *string
ActionRequired bool
Tags []string
TriggerPhrases []string
CreatedAt time.Time
UpdatedAt time.Time
}
Memory represents memory metadata in the database
type MemoryRelationship ¶
type MemoryRelationship struct {
FromMemoryID string
ToMemoryID string
RelationshipType string
CreatedAt time.Time
}
MemoryRelationship represents a relationship between memories
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore handles SQLite operations for metadata storage
func NewSQLiteStore ¶
func NewSQLiteStore(dbPath string) (*SQLiteStore, error)
NewSQLiteStore creates a new SQLite store
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
Close closes the database connection
func (*SQLiteStore) CreateMemory ¶
func (s *SQLiteStore) CreateMemory(memory *Memory) error
CreateMemory creates a new memory with tags and trigger phrases
func (*SQLiteStore) CreateProject ¶
func (s *SQLiteStore) CreateProject(project *Project) error
CreateProject creates a new project
func (*SQLiteStore) CreateRelationship ¶
func (s *SQLiteStore) CreateRelationship(rel *MemoryRelationship) error
CreateRelationship creates a relationship between two memories
func (*SQLiteStore) CreateSession ¶
func (s *SQLiteStore) CreateSession(session *Session) error
CreateSession creates a new session
func (*SQLiteStore) GetLastSession ¶
func (s *SQLiteStore) GetLastSession(projectID string) (*Session, error)
GetLastSession retrieves the most recent session for a project
func (*SQLiteStore) GetMemory ¶
func (s *SQLiteStore) GetMemory(id string) (*Memory, error)
GetMemory retrieves a memory by ID with its tags and trigger phrases
func (*SQLiteStore) GetProject ¶
func (s *SQLiteStore) GetProject(id string) (*Project, error)
GetProject retrieves a project by ID
func (*SQLiteStore) GetProjectByPath ¶
func (s *SQLiteStore) GetProjectByPath(path string) (*Project, error)
GetProjectByPath retrieves a project by path
func (*SQLiteStore) GetRelationships ¶
func (s *SQLiteStore) GetRelationships(memoryID string) ([]MemoryRelationship, error)
GetRelationships retrieves all relationships for a memory
func (*SQLiteStore) GetSession ¶
func (s *SQLiteStore) GetSession(id string) (*Session, error)
GetSession retrieves a session by ID
func (*SQLiteStore) UpdateSession ¶
func (s *SQLiteStore) UpdateSession(session *Session) error
UpdateSession updates a session
type Session ¶
type Session struct {
ID string
ProjectID string
StartedAt time.Time
EndedAt *time.Time
DurationSeconds *int
}
Session represents a session in the database
type VectorSearchResult ¶
VectorSearchResult represents a result from vector search
type WeaviateStore ¶
type WeaviateStore struct {
// contains filtered or unexported fields
}
WeaviateStore handles vector storage operations
func NewWeaviateStore ¶
func NewWeaviateStore(host string, scheme string) (*WeaviateStore, error)
NewWeaviateStore creates a new Weaviate store
func NewWeaviateStoreWithAuth ¶
func NewWeaviateStoreWithAuth(host string, scheme string, apiKey string) (*WeaviateStore, error)
NewWeaviateStoreWithAuth creates a new Weaviate store with authentication
func (*WeaviateStore) Close ¶
func (w *WeaviateStore) Close() error
Close closes the Weaviate connection
func (*WeaviateStore) Delete ¶
func (w *WeaviateStore) Delete(id string) error
Delete deletes a memory by ID
func (*WeaviateStore) Search ¶
func (w *WeaviateStore) Search(embedding []float32, limit int, filterMap map[string]interface{}) ([]VectorSearchResult, error)
Search performs vector similarity search