- 在 api/agents/conversation_agent.py 中添加 _detect_user_stage 方法,以通过关键词检测用户谈论的人生阶段。 - 在 api/agents/memory_agent.py 中更新章节排序逻辑,使用 STAGE_TO_ORDER 替代 CHAPTER_ORDER。 - 在 api/agents/state_schema.py 中添加方法以获取各阶段的填充情况。 - 在 api/agents/prompts/conversation_prompts.py 中更新对话提示,包含用户阶段检测和整体进度信息。 - 在 api/migrations/fix_chapter_order_index.sql 中添加 SQL 脚本以修复章节 order_index 的问题。 - 更新相关文档和提示以反映新功能。
40 lines
952 B
Python
40 lines
952 B
Python
"""
|
|
提示词模块
|
|
"""
|
|
from .conversation_prompts import (
|
|
ConversationStage,
|
|
get_system_prompt as get_conversation_prompt,
|
|
get_questions_for_stage,
|
|
get_guided_conversation_prompt,
|
|
INTERVIEW_QUESTIONS,
|
|
)
|
|
from .memory_prompts import (
|
|
get_system_prompt as get_memory_prompt,
|
|
get_chapter_classification_prompt,
|
|
get_text_rewrite_prompt,
|
|
get_state_extraction_prompt,
|
|
get_creative_title_prompt,
|
|
get_narrative_prompt,
|
|
CHAPTER_CATEGORIES,
|
|
CHAPTER_ORDER,
|
|
STAGE_TO_ORDER,
|
|
)
|
|
|
|
__all__ = [
|
|
"ConversationStage",
|
|
"get_conversation_prompt",
|
|
"get_questions_for_stage",
|
|
"get_guided_conversation_prompt",
|
|
"INTERVIEW_QUESTIONS",
|
|
"get_memory_prompt",
|
|
"get_chapter_classification_prompt",
|
|
"get_text_rewrite_prompt",
|
|
"get_state_extraction_prompt",
|
|
"get_creative_title_prompt",
|
|
"get_narrative_prompt",
|
|
"CHAPTER_CATEGORIES",
|
|
"CHAPTER_ORDER",
|
|
"STAGE_TO_ORDER",
|
|
]
|
|
|