feat(memory): add emotion batch extraction task and improve extraction prompts

- Add extract_emotion_batch_task for async emotion extraction
- Refine Chinese entity types and relation types in extraction prompts
- Add STATEMENT_EMOTION_UPDATE Cypher query for Neo4j backfill
- Refactor statement_step and triplet_step implementations
This commit is contained in:
lanceyq
2026-04-24 13:55:14 +08:00
parent a98011fc8a
commit b0ddd12cc6
14 changed files with 1321 additions and 833 deletions

View File

@@ -114,6 +114,9 @@ celery_app.conf.update(
# Metadata extraction → memory_tasks queue
'app.tasks.extract_user_metadata': {'queue': 'memory_tasks'},
# Async emotion extraction → memory_tasks queue (IO-bound LLM calls)
'app.tasks.extract_emotion_batch': {'queue': 'memory_tasks'},
# Document tasks → document_tasks queue (prefork worker)
'app.core.rag.tasks.parse_document': {'queue': 'document_tasks'},
'app.core.rag.tasks.sync_knowledge_for_kb': {'queue': 'document_tasks'},