app: description: 支持日/周/月成员摘要生成的统一 workflow,按 digest_type 分支输出严格 JSON icon: 🤖 icon_background: '#E0F2FE' mode: workflow name: member_context use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/openai_api_compatible:0.0.27@f9ce3ff5e28f09931a3a7fca59add2d09590408f7e9a3d701b10c77a60249719 version: null kind: app version: 0.6.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .TXT allowed_file_types: - document allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_batch_limit: 10 image_file_size_limit: 10 single_chunk_attachment_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: false sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false isInLoop: false sourceType: start targetType: if-else id: start-source-router-target selected: false source: start_node sourceHandle: source target: digest_router targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: llm id: digest_router-daily-daily_llm-target selected: false source: digest_router sourceHandle: daily_case target: daily_llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: llm id: digest_router-weekly-weekly_llm-target selected: false source: digest_router sourceHandle: weekly_case target: weekly_llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: llm id: digest_router-monthly-monthly_llm-target selected: false source: digest_router sourceHandle: monthly_case target: monthly_llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: llm id: digest_router-false-invalid_llm-target selected: false source: digest_router sourceHandle: 'false' target: invalid_llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: end id: daily_llm-source-end_daily-target selected: false source: daily_llm sourceHandle: source target: end_daily targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: end id: weekly_llm-source-end_weekly-target selected: false source: weekly_llm sourceHandle: source target: end_weekly targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: end id: monthly_llm-source-end_monthly-target selected: false source: monthly_llm sourceHandle: source target: end_monthly targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: end id: invalid_llm-source-end_invalid-target selected: false source: invalid_llm sourceHandle: source target: end_invalid targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: 开始 type: start variables: - label: digest_type max_length: 32 options: [] required: true type: text-input variable: digest_type - label: query max_length: 120000 options: [] required: false type: paragraph variable: query - label: chatroom_id max_length: 128 options: [] required: true type: text-input variable: chatroom_id - label: wxid max_length: 128 options: [] required: false type: text-input variable: wxid - label: display_name max_length: 128 options: [] required: false type: text-input variable: display_name - label: digest_date max_length: 32 options: [] required: false type: text-input variable: digest_date - label: period_key max_length: 64 options: [] required: false type: text-input variable: period_key - label: member_labels max_length: 50000 options: [] required: false type: paragraph variable: member_labels - label: compressed_chat max_length: 200000 options: [] required: false type: paragraph variable: compressed_chat - label: source_items_json max_length: 200000 options: [] required: false type: paragraph variable: source_items_json - label: source_item_count max_length: 32 options: [] required: false type: text-input variable: source_item_count height: 388 id: start_node position: x: 0 y: 110 positionAbsolute: x: 0 y: 110 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: cases: - case_id: daily_case conditions: - comparison_operator: contains id: daily_case_cond value: daily varType: string variable_selector: - start_node - digest_type id: daily_case logical_operator: and - case_id: weekly_case conditions: - comparison_operator: contains id: weekly_case_cond value: weekly varType: string variable_selector: - start_node - digest_type id: weekly_case logical_operator: and - case_id: monthly_case conditions: - comparison_operator: contains id: monthly_case_cond value: monthly varType: string variable_selector: - start_node - digest_type id: monthly_case logical_operator: and desc: '' selected: false title: 摘要类型分支 type: if-else height: 222 id: digest_router position: x: 312 y: 162 positionAbsolute: x: 312 y: 162 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] desc: '' error_strategy: default-value model: completion_params: temperature: 0.2 mode: chat name: gpt-5.4-mini provider: langgenius/openai_api_compatible/openai_api_compatible prompt_template: - id: daily_system_prompt role: system text: | 你是微信群后台的成员日行为证据提取器。 任务: 根据给定的一天群聊记录,只按 wxid 识别成员,输出每个成员当天的结构化行为观察。 关键规则: 1. wxid 是唯一标识。display_name 仅用于展示,不用于身份判定。 2. 每个 wxid 最终只能输出一条记录,严禁重复输出同一个 wxid。 3. 请先按 wxid 汇总该成员全天发言,再提取结果。 4. 即使成员发言以短句为主,只要样本量足够,也必须尽量提炼: - topics - discussion_scenarios - skill_signals - problem_solving_signals - value_preferences - habit_signals - expression_markers - engagement_traits - reply_entry_points - social_role - temperament_signal - summary_text 5. identity_clues、family_signals、life_stage_signals 没有明确公开证据时允许为空。 6. 不允许因为“短句较多”就统一输出空数组和通用摘要。 7. 不做心理诊断、不做隐私猜测、不把玩笑当事实。 8. 只能输出候选成员列表中的 wxid。 9. topics 更偏向反复出现的关注方向;discussion_scenarios 更偏向什么情境下会发言;skill_signals 更偏向能力表现;problem_solving_signals 更偏向怎么处理问题;value_preferences 更偏向判断偏好;social_role 更偏向当天在群里的实际作用。 10. expression_markers 记录可观察的表达标记,如常用句式、口头禅、是否爱列步骤/贴日志;reply_entry_points 记录什么样的接话方式最容易接住他。 输出要求: - 只输出严格 JSON,不要 markdown,不要解释,不要前后缀。 - 输出格式: { "members": [ { "wxid": "成员wxid", "display_name": "显示名", "topics": ["主题1"], "discussion_scenarios": ["场景1"], "identity_clues": ["身份线索1"], "skill_signals": ["技能信号1"], "problem_solving_signals": ["处理方式1"], "family_signals": ["家庭线索1"], "life_stage_signals": ["阶段线索1"], "value_preferences": ["价值偏好1"], "interaction_style": "一句中文", "message_pattern": "一句中文", "response_style_hint": "一句中文", "habit_signals": ["习惯1"], "expression_markers": ["表达标记1"], "engagement_traits": ["参与特征1"], "reply_entry_points": ["接话点1"], "decision_style": "一句中文", "social_role": "一句中文", "reply_taboos": ["避坑1"], "temperament_signal": "一句中文", "summary_text": "不超过100字", "representative_messages": ["原话1", "原话2"], "confidence": 0.95 } ] } 字段约束: - topics、discussion_scenarios、skill_signals、problem_solving_signals、value_preferences、habit_signals、expression_markers、engagement_traits、reply_entry_points 最多 4 个 - identity_clues、family_signals、life_stage_signals 最多 3 个 - reply_taboos 最多 3 个 - representative_messages 最多 3 条 - 如果某成员样本明显不足,可以不输出该成员 - id: daily_user_prompt role: user text: | 摘要类型: daily 群ID: {{#start_node.chatroom_id#}} 日期: {{#start_node.digest_date#}} 候选成员: {{#start_node.member_labels#}} 压缩后的群聊记录: {{#start_node.compressed_chat#}} 补充上下文: {{#start_node.query#}} retry_config: max_retries: 3 retry_enabled: true retry_interval: 1000 selected: false title: 日摘要生成 type: llm variables: [] vision: enabled: false height: 154 id: daily_llm position: x: 652 y: 18 positionAbsolute: x: 652 y: 18 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] desc: '' error_strategy: default-value model: completion_params: temperature: 0.2 mode: chat name: gpt-5.4-mini provider: langgenius/openai_api_compatible/openai_api_compatible prompt_template: - id: weekly_system_prompt role: system text: | 你是微信群后台的成员周摘要生成器。 任务: 根据同一成员的多个日摘要,提炼本周重复出现的模式,过滤单日噪音,输出严格 JSON。 关键规则: 1. 只根据输入中的下级摘要生成,不可编造新增事实。 2. 只有多个日摘要反复出现的特征,才允许进入 stable_topics、stable_traits、habit_patterns、reply_preferences。 3. recent_state 只描述当前阶段状态,不要把短期现象写成长期人格。 4. identity_traits、family_profile、life_stage_profile 只能保留反复出现的公开线索。 5. common_scenarios、problem_solving_profile、expression_profile、reply_entry_profile 要尽量写成具体行为模式。 输出要求: - 只输出严格 JSON,不要 markdown,不要解释,不要前后缀。 - 输出格式: { "stable_topics": ["主题1"], "common_scenarios": ["场景1"], "identity_traits": ["身份特征1"], "skill_profile": ["技能画像1"], "problem_solving_profile": ["处理方式1"], "family_profile": ["家庭线索1"], "life_stage_profile": ["阶段线索1"], "value_profile": ["价值偏好1"], "stable_traits": ["特征1"], "habit_patterns": ["习惯1"], "expression_profile": ["表达标记1"], "reply_entry_profile": ["接话点1"], "reply_preferences": ["偏好1"], "group_role": "一句中文", "decision_profile": "一句中文", "recent_state": ["状态1"], "temperament_tendency": "一句中文", "summary_text": "一段不超过120字的周摘要", "confidence": 0.0 } - id: weekly_user_prompt role: user text: | 摘要类型: weekly 群ID: {{#start_node.chatroom_id#}} 成员: {{#start_node.display_name#}} ({{#start_node.wxid#}}) 周期: {{#start_node.period_key#}} 下级摘要数量: {{#start_node.source_item_count#}} 下级摘要 JSON: {{#start_node.source_items_json#}} 补充上下文: {{#start_node.query#}} retry_config: max_retries: 3 retry_enabled: true retry_interval: 1000 selected: false title: 周摘要生成 type: llm variables: [] vision: enabled: false height: 154 id: weekly_llm position: x: 652 y: 196 positionAbsolute: x: 652 y: 196 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] desc: '' error_strategy: default-value model: completion_params: temperature: 0.2 mode: chat name: gpt-5.4-mini provider: langgenius/openai_api_compatible/openai_api_compatible prompt_template: - id: monthly_system_prompt role: system text: | 你是微信群后台的成员月摘要生成器。 任务: 根据同一成员的多个周摘要,提炼阶段性稳定特征,只有反复出现的模式才能进入长期层,输出严格 JSON。 关键规则: 1. 只根据输入中的下级摘要生成,不可编造新增事实。 2. 只有多个周摘要反复出现的特征,才允许进入 long_term_topics、stable_traits、habit_patterns、long_term_reply_preferences。 3. phase_state 只描述当前阶段状态,不要冒充长期人格。 4. identity_traits、family_profile、life_stage_profile 只能保留反复出现的公开线索。 5. group_role、decision_profile、problem_solving_profile、expression_profile 要总结阶段性稳定模式。 输出要求: - 只输出严格 JSON,不要 markdown,不要解释,不要前后缀。 - 输出格式: { "long_term_topics": ["主题1"], "common_scenarios": ["场景1"], "identity_traits": ["身份特征1"], "skill_profile": ["技能画像1"], "problem_solving_profile": ["处理方式1"], "family_profile": ["家庭线索1"], "life_stage_profile": ["阶段线索1"], "value_profile": ["价值偏好1"], "stable_traits": ["特征1"], "habit_patterns": ["习惯1"], "expression_profile": ["表达标记1"], "reply_entry_profile": ["接话点1"], "long_term_reply_preferences": ["偏好1"], "group_role": "一句中文", "decision_profile": "一句中文", "phase_state": ["状态1"], "temperament_tendency": "一句中文", "summary_text": "一段不超过140字的月摘要", "confidence": 0.0 } - id: monthly_user_prompt role: user text: | 摘要类型: monthly 群ID: {{#start_node.chatroom_id#}} 成员: {{#start_node.display_name#}} ({{#start_node.wxid#}}) 周期: {{#start_node.period_key#}} 下级摘要数量: {{#start_node.source_item_count#}} 下级摘要 JSON: {{#start_node.source_items_json#}} 补充上下文: {{#start_node.query#}} retry_config: max_retries: 3 retry_enabled: true retry_interval: 1000 selected: false title: 月摘要生成 type: llm variables: [] vision: enabled: false height: 154 id: monthly_llm position: x: 652 y: 374 positionAbsolute: x: 652 y: 374 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] default_value: - key: text type: string value: '{"error":"unsupported_digest_type"}' desc: '' error_strategy: default-value model: completion_params: temperature: 0.1 mode: chat name: gpt-5.4-mini provider: langgenius/openai_api_compatible/openai_api_compatible prompt_template: - id: invalid_system_prompt role: system text: | 你是一个严格返回 JSON 的错误响应器。 当摘要类型不受支持时,只返回一个紧凑 JSON。 - id: invalid_user_prompt role: user text: | 输入的 digest_type 是: {{#start_node.digest_type#}} 请只返回: {"error":"unsupported_digest_type","digest_type":"原值"} selected: false title: 非法类型处理 type: llm vision: enabled: false height: 124 id: invalid_llm position: x: 652 y: 552 positionAbsolute: x: 652 y: 552 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: desc: '' outputs: - value_selector: - daily_llm - text variable: text selected: false title: 结束-日 type: end height: 88 id: end_daily position: x: 1016 y: 54 positionAbsolute: x: 1016 y: 54 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: desc: '' outputs: - value_selector: - weekly_llm - text variable: text selected: false title: 结束-周 type: end height: 88 id: end_weekly position: x: 1016 y: 232 positionAbsolute: x: 1016 y: 232 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: desc: '' outputs: - value_selector: - monthly_llm - text variable: text selected: false title: 结束-月 type: end height: 88 id: end_monthly position: x: 1016 y: 410 positionAbsolute: x: 1016 y: 410 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: desc: '' outputs: - value_selector: - invalid_llm - text variable: text selected: false title: 结束-异常 type: end height: 88 id: end_invalid position: x: 1016 y: 588 positionAbsolute: x: 1016 y: 588 selected: false sourcePosition: right targetPosition: left type: custom width: 242 viewport: x: 60 y: 120 zoom: 0.7 rag_pipeline_variables: []