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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user