Expand description
Topic index service for memory organization.
Maintains an index of topics extracted from memories for quick lookup and topic-based resource access.
Structsยง
- Topic
Index Service - Service for maintaining topic โ memory mappings.
- Topic
Info - Information about a topic in the index.
Constantsยง
- DEFAULT_
REFRESH_ ๐INTERVAL_ SECS - Default refresh interval in seconds.
- MAX_
INDEX_ ๐MEMORIES - Maximum memories to retrieve for index building.
- MAX_
TOPIC_ ๐WORD_ LENGTH - Maximum word length to consider for topic extraction.
- MIN_
TOPIC_ ๐WORD_ LENGTH - Minimum word length to consider for topic extraction.
Functionsยง
- add_
topic_ ๐entry - Adds a topic entry to the maps (helper to reduce nesting).
- add_
topic_ ๐entry_ guarded - Adds a topic entry to guarded maps (for use with lock guards).
- add_
topic_ ๐with_ min_ length - Adds a topic entry only if it meets minimum length requirement.
- extract_
content_ ๐keywords - Extracts keyword topics from content.
- insert_
namespace_ ๐if_ missing - Inserts a namespace into the list if not already present.
- normalize_
topic ๐ - Normalizes a topic name for consistent indexing.