Commit d25431f7 authored by zhouwei's avatar zhouwei

Upload New File

parent 5d2ade78
Pipeline #964 canceled with stages
app:
description: 规范自然灾害事件
icon: ✉️
icon_background: '#E0F2FE'
mode: workflow
name: 消息标签v0.1.0-DeepseekV3
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.10@ba0a7fc3151e89bf8645cd3abb3ccff971ee59e5b1127efca50b092dbb93bf80
kind: app
version: 0.1.5
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
allowed_file_extensions:
- .JPG
- .JPEG
- .PNG
- .GIF
- .WEBP
- .SVG
allowed_file_types:
- image
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_size_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
sourceType: code
targetType: end
id: 1727242813814-source-1727235861736-target
source: '1727242813814'
sourceHandle: source
target: '1727235861736'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: start
targetType: llm
id: 1727233123593-source-1732778846154-target
source: '1727233123593'
sourceHandle: source
target: '1732778846154'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: code
id: 1732778846154-source-1727242813814-target
source: '1732778846154'
sourceHandle: source
target: '1727242813814'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: "{\n \"msg_info\": \"DeryckWhibley坚称他'不是骗子',前经理否认了性胁迫指控\",\n \"sys.files\"\
: [],\n \"sys.user_id\": \"sl_backend_twitter\"\n}"
selected: false
title: 开始
type: start
variables:
- label: msg_info
max_length: 2000
options: []
required: true
type: paragraph
variable: msg_info
height: 197
id: '1727233123593'
position:
x: -61.60583804915933
y: 291.69166477189617
positionAbsolute:
x: -61.60583804915933
y: 291.69166477189617
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 243
- data:
desc: ''
outputs:
- value_selector:
- '1727242813814'
- result
variable: result
selected: false
title: 结束
type: end
height: 89
id: '1727235861736'
position:
x: 1122.9814661452995
y: 304.9033674451216
positionAbsolute:
x: 1122.9814661452995
y: 304.9033674451216
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 243
- data:
code: "disaster_dict = {\n\"枪击\":\"Shooting\",\n\"抢劫\":\"Robbery\",\n\"爆炸\"\
:\"Explosion\",\n\"恐怖袭击\":\"Terrorist Attack\",\n\"纵火\":\"Arson\",\n\"大规模伤亡事件\
\ (MCI)\":\"Mass Casualty Incident (MCI)\",\n\"人质事件\":\"Hostage Situation\"\
,\n\"毒气泄漏\":\"Toxic Gas Leak\",\n\"生物危害\":\"Biological Hazard\",\n\"交通意外\"\
:\"Traffic Accident\",\n\"建筑物倒塌\":\"Building Collapse\",\n\"食品安全\":\"Food\
\ Safety\",\n\"社会冲突\":\"Social Conflict\",\n\"群体性事件\":\"Mass Gathering Incident\"\
,\n\"环境污染\":\"Environmental Pollution\",\n\"重大事故\":\"Major Accident\",\n\
\"抗议示威\":\"Protest Demonstration\",\n\"集体维权\":\"Collective Advocacy\",\n\
\"活动失控骚乱\":\"Uncontrolled Event Riot\",\n\"地域冲突\":\"Territorial Conflict\"\
,\n\"性别冲突\":\"Gender Conflict\",\n\"宗教冲突\":\"Religious Conflict\",\n\"民族冲突\"\
:\"Ethnic Conflict\",\n\"阶级冲突\":\"Class Conflict\",\n\"食物中毒\":\"Food Poisoning\"\
\n}\n\ndef main(kn_result: dict) -> dict:\n kn_result = kn_result.replace(\"\
输出:\",\"\")\n json_obj = [{\"code\": \"\", \"name\": kn_result, \"score\"\
: None}]\n \n json_obj = parse_json_to_list(kn_result)\n # return\
\ {\n # \"result\": json_obj,\n # }\n \n # try:\n # \
\ json_obj = parse_json_to_list(kn_result)\n # return {\n #\
\ \"result\": json_obj,\n # }\n # except:\n # pass\n\
\ \n\n return {\n \"result\": json_obj,\n }\n \ndef parse_json_to_list(name):\n\
\ result_list = []\n\n # Iterating over the 'result' list in the JSON\n\
\ code = disaster_dict.get(name, \"\")\n if len(code)>0:\n \
\ result_list.append({\"code\": code, \"name\": name})\n\n return result_list\
\ \n \n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: array[object]
selected: false
title: KnResult2Obj
type: code
variables:
- value_selector:
- '1732778846154'
- text
variable: kn_result
height: 53
id: '1727242813814'
position:
x: 663.6977906608877
y: 291.69166477189617
positionAbsolute:
x: 663.6977906608877
y: 291.69166477189617
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 243
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params: {}
mode: chat
name: deepseek-v3-250324
provider: langgenius/volcengine_maas/volcengine_maas
prompt_template:
- id: ff06405d-dfb9-40ca-987a-c24fd3cfd6fb
role: system
text: '```xml
<instruction>
对新闻内容进行标签分类,仅当标签评分达到或超过80分时才应用该标签。可选的标签包括:枪击, 抢劫, 爆炸, 恐怖袭击, 纵火, 大规模伤亡事件,
人质事件, 毒气泄漏, 生物危害, 交通意外, 建筑物倒塌, 食品安全, 社会冲突, 群体性事件, 重大事故, 集体维权, 地域冲突, 宗教冲突,
民族冲突, 阶级冲突, 食物中毒。
<instructions>
1. 仔细阅读新闻内容,理解其核心事件和背景。
2. 根据新闻内容,评估每个标签的适用性,并为每个标签打分(0-100分)。
3. 仅选择评分达到或超过80分的标签作为最终标签。
4. 如果新闻内容与任何标签的匹配度均低于80分,则输出“无适用标签”。
5. 确保输出结果不包含任何XML标签,仅列出适用的标签名称,多个标签用逗号分隔。
6. 如果新闻内容涉及多个高评分标签,则按相关性从高到低排序。
<examples>
<example>
输入:某市发生一起持枪抢劫银行事件,造成3人死亡,5人受伤。
输出:枪击, 抢劫, 大规模伤亡事件
</example>
<example>
输入:某工厂发生化学气体泄漏,导致附近居民出现中毒症状。
输出:毒气泄漏
</example>
<example>
输入:某地区因土地纠纷引发大规模抗议活动,警方与示威者发生冲突。
输出:社会冲突, 群体性事件
</example>
<note>
1. 标签评分必须严格遵循80分的阈值,低于80分的标签不得使用。
2. 确保标签的准确性和相关性,避免过度标记或遗漏重要标签。
3. 对于模糊或不确定的内容,优先选择最相关的标签,避免猜测。
4. 输出结果必须简洁明了,仅包含适用的标签名称。
</note>
</instruction>
```'
- id: 9f485eef-bc41-4f14-b8dd-9d507b6a8d3d
role: user
text: '{{#1727233123593.msg_info#}}'
selected: true
title: LLM
type: llm
variables: []
vision:
enabled: false
height: 89
id: '1732778846154'
position:
x: 241.82807864225322
y: 291.69166477189617
positionAbsolute:
x: 241.82807864225322
y: 291.69166477189617
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 243
viewport:
x: 185.06078589047775
y: 3.447951724393647
zoom: 0.751517595495081
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment