refactor(memory): consolidate memory search services and update model client handling

- Consolidate memory search services by removing separate content_search.py and perceptual_search.py
- Update model client handling in base_pipeline.py to use ModelApiKeyService for LLM client initialization
- Add new prompt files and modify existing services to support consolidated search architecture
- Refactor memory read pipeline and related services to use updated model client approach
This commit is contained in:
Eternity
2026-04-16 13:46:39 +08:00
parent a01525e239
commit 749cf79581
4 changed files with 27 additions and 9 deletions

View File

@@ -19,7 +19,8 @@ async def create_fulltext_indexes():
# """)
# 创建 Entities 索引
await connector.execute_query("""
CREATE FULLTEXT INDEX entitiesFulltext IF NOT EXISTS FOR (e:ExtractedEntity) ON EACH [e.name]
CREATE FULLTEXT INDEX entitiesFulltext IF NOT EXISTS
FOR (e:ExtractedEntity) ON EACH [e.name, e.description, e.aliases]
OPTIONS { indexConfig: { `fulltext.analyzer`: 'cjk' } }
""")
@@ -139,6 +140,16 @@ async def create_vector_indexes():
await connector.close()
async def create_user_indexes():
connector = Neo4jConnector()
await connector.execute_query(
"""
CREATE INDEX user_perceptual IF NOT EXISTS
FOR (p:Perceptual) ON (p.end_user_id);
"""
)
async def create_unique_constraints():
"""Create uniqueness constraints for core node identifiers.
Ensures concurrent MERGE operations remain safe and prevents duplicates.