member_context: split daily weekly monthly digest scheduling
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
app:
|
||||
description: 按群和日期提取群成员日画像,输出严格 JSON,供 member_context 插件直接消费
|
||||
icon: 🧠
|
||||
description: 支持日/周/月成员摘要生成的统一 workflow,按 digest_type 分支输出严格 JSON
|
||||
icon: 🤖
|
||||
icon_background: '#E0F2FE'
|
||||
mode: workflow
|
||||
name: member_context
|
||||
@@ -9,9 +9,10 @@ dependencies:
|
||||
- current_identifier: null
|
||||
type: marketplace
|
||||
value:
|
||||
marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.13@d402dc32a505b1b4f27588f10e729209bf413ec263467635774d96c4345bd197
|
||||
marketplace_plugin_unique_identifier: langgenius/openai_api_compatible:0.0.27@f9ce3ff5e28f09931a3a7fca59add2d09590408f7e9a3d701b10c77a60249719
|
||||
version: null
|
||||
kind: app
|
||||
version: 0.3.0
|
||||
version: 0.6.0
|
||||
workflow:
|
||||
conversation_variables: []
|
||||
environment_variables: []
|
||||
@@ -29,7 +30,9 @@ workflow:
|
||||
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:
|
||||
@@ -59,12 +62,64 @@ workflow:
|
||||
isInIteration: false
|
||||
isInLoop: false
|
||||
sourceType: start
|
||||
targetType: llm
|
||||
id: start-source-llm-target
|
||||
targetType: if-else
|
||||
id: start-source-router-target
|
||||
selected: false
|
||||
source: 'start_node'
|
||||
source: start_node
|
||||
sourceHandle: source
|
||||
target: 'llm_node'
|
||||
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
|
||||
@@ -73,11 +128,50 @@ workflow:
|
||||
isInLoop: false
|
||||
sourceType: llm
|
||||
targetType: end
|
||||
id: llm-source-end-target
|
||||
id: daily_llm-source-end_daily-target
|
||||
selected: false
|
||||
source: 'llm_node'
|
||||
source: daily_llm
|
||||
sourceHandle: source
|
||||
target: 'end_node'
|
||||
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
|
||||
@@ -88,6 +182,12 @@ workflow:
|
||||
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: []
|
||||
@@ -100,55 +200,133 @@ workflow:
|
||||
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: true
|
||||
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: true
|
||||
required: false
|
||||
type: paragraph
|
||||
variable: member_labels
|
||||
- label: compressed_chat
|
||||
max_length: 200000
|
||||
options: []
|
||||
required: true
|
||||
required: false
|
||||
type: paragraph
|
||||
variable: compressed_chat
|
||||
height: 194
|
||||
id: 'start_node'
|
||||
- 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: -420
|
||||
y: 120
|
||||
x: 0
|
||||
y: 110
|
||||
positionAbsolute:
|
||||
x: -420
|
||||
y: 120
|
||||
x: 0
|
||||
y: 110
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
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: []
|
||||
default_value:
|
||||
- key: text
|
||||
type: string
|
||||
value: '{"members":[]}'
|
||||
desc: ''
|
||||
error_strategy: default-value
|
||||
model:
|
||||
completion_params:
|
||||
temperature: 0.2
|
||||
mode: chat
|
||||
name: Doubao-1.5-pro-256k
|
||||
provider: langgenius/volcengine_maas/volcengine_maas
|
||||
name: gpt-5.4-mini
|
||||
provider: langgenius/openai_api_compatible/openai_api_compatible
|
||||
prompt_template:
|
||||
- id: system_prompt_member_context
|
||||
- id: daily_system_prompt
|
||||
role: system
|
||||
text: |
|
||||
你是微信群后台的成员日行为证据提取器。
|
||||
@@ -179,7 +357,6 @@ workflow:
|
||||
8. 只能输出候选成员列表中的 wxid。
|
||||
9. topics 更偏向反复出现的关注方向;discussion_scenarios 更偏向什么情境下会发言;skill_signals 更偏向能力表现;problem_solving_signals 更偏向怎么处理问题;value_preferences 更偏向判断偏好;social_role 更偏向当天在群里的实际作用。
|
||||
10. expression_markers 记录可观察的表达标记,如常用句式、口头禅、是否爱列步骤/贴日志;reply_entry_points 记录什么样的接话方式最容易接住他。
|
||||
11. 输出前自行去重,同一个 wxid 只保留一条最完整结果。
|
||||
|
||||
输出要求:
|
||||
- 只输出严格 JSON,不要 markdown,不要解释,不要前后缀。
|
||||
@@ -221,9 +398,10 @@ workflow:
|
||||
- reply_taboos 最多 3 个
|
||||
- representative_messages 最多 3 条
|
||||
- 如果某成员样本明显不足,可以不输出该成员
|
||||
- id: user_prompt_member_context
|
||||
- id: daily_user_prompt
|
||||
role: user
|
||||
text: |
|
||||
摘要类型: daily
|
||||
群ID: {{#start_node.chatroom_id#}}
|
||||
日期: {{#start_node.digest_date#}}
|
||||
|
||||
@@ -232,49 +410,350 @@ workflow:
|
||||
|
||||
压缩后的群聊记录:
|
||||
{{#start_node.compressed_chat#}}
|
||||
|
||||
补充上下文:
|
||||
{{#start_node.query#}}
|
||||
retry_config:
|
||||
max_retries: 3
|
||||
retry_enabled: true
|
||||
retry_interval: 1000
|
||||
selected: false
|
||||
title: 成员画像提取
|
||||
title: 日摘要生成
|
||||
type: llm
|
||||
variables: []
|
||||
vision:
|
||||
enabled: false
|
||||
height: 98
|
||||
id: 'llm_node'
|
||||
height: 154
|
||||
id: daily_llm
|
||||
position:
|
||||
x: 10
|
||||
y: 140
|
||||
x: 652
|
||||
y: 18
|
||||
positionAbsolute:
|
||||
x: 10
|
||||
y: 140
|
||||
x: 652
|
||||
y: 18
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
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:
|
||||
- 'llm_node'
|
||||
- daily_llm
|
||||
- text
|
||||
variable: text
|
||||
selected: false
|
||||
title: 结束
|
||||
title: 结束-日
|
||||
type: end
|
||||
height: 90
|
||||
id: 'end_node'
|
||||
height: 88
|
||||
id: end_daily
|
||||
position:
|
||||
x: 430
|
||||
y: 140
|
||||
x: 1016
|
||||
y: 54
|
||||
positionAbsolute:
|
||||
x: 430
|
||||
y: 140
|
||||
x: 1016
|
||||
y: 54
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
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: 120
|
||||
y: 180
|
||||
zoom: 0.9
|
||||
x: 60
|
||||
y: 120
|
||||
zoom: 0.7
|
||||
rag_pipeline_variables: []
|
||||
|
||||
Reference in New Issue
Block a user