Module topic_index

Module topic_index 

Source
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ยง

TopicIndexService
Service for maintaining topic โ†’ memory mappings.
TopicInfo
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.