Commit da437dd3 authored by zhouwei's avatar zhouwei

Upload New File

parent df658678
Pipeline #967 failed with stages
app:
description: 规范自然灾害事件
icon: ✉️
icon_background: '#E0F2FE'
mode: workflow
name: 人为灾害标签-中文v0.2.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 \"工业事故\": \"IndustriaAccident\",\n \"交通事故\"\
: \"TrafficAccident\",\n \"火灾\": \"Fire\",\n \"爆炸事件\": \"Explosion\"\
,\n \"核事故\": \"NuclearAccident\",\n \"化学品泄漏\": \"ChemicalSpill\",\n\
\ \"油轮泄漏\": \"OilSpill\",\n \"矿难\": \"MiningAccident\",\n \"矿事故\"\
: \"MiningAccident\",\n \"食物中毒\": \"FoodPoisoning\",\n \"公共卫生事件\"\
:\"PublicHealthEmergency\",\n \"恐怖袭击\": \"Terrorism\",\n \"建筑物倒塌\"\
: \"BuildingCollapse\",\n \"建筑物坍塌\": \"BuildingCollapse\",\n \"水坝溃坝\"\
: \"DamBurst\",\n \"游行抗议\": \"Protest\"\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分时,才为其打上相应的标签。标签包括:工业事故、交通事故、火灾、爆炸事件、核事故、化学品泄漏、油轮泄漏、矿难、矿事故、食物中毒、公共卫生事件、恐怖袭击、建筑物倒塌、建筑物坍塌、水坝溃坝、游行抗议。以下是具体的操作步骤:
1. **阅读新闻内容**:仔细阅读新闻全文,确保理解新闻的核心事件和背景。
2. **检查评分**:确认新闻的评分是否高于80分。如果低于或等于80分,则无需打标签。
3. **匹配标签**:根据新闻内容,从给定的标签列表中选择最符合新闻事件的标签。如果新闻涉及多个事件,可以打多个标签。
4. **输出标签**:将匹配的标签以逗号分隔的形式输出,不要包含任何XML标签或其他无关内容。
请确保标签的准确性和相关性,避免主观臆断。如果新闻内容与任何标签都不匹配,则无需输出标签。
</instruction>
<examples>
以下是三个输入和输出的示例对:
<example>
输入:某化工厂发生爆炸,造成多人伤亡,评分为95分。
输出:爆炸事件,化学品泄漏
</example>
<example>
输入:某市发生大规模游行抗议活动,评分为92分。
输出:游行抗议
</example>
<example>
输入:某煤矿发生坍塌事故,导致数十人被困,评分为88分。
输出:
</example>
</examples>
<notes>
1. 仅当评分高于80分时才打标签,否则不输出任何内容。
2. 标签必须严格从给定的列表中选择,不得自行添加或修改标签。
3. 输出时不要包含任何额外的解释或格式,仅输出标签本身。
4. 如果新闻内容涉及多个标签,按相关性从高到低排列,用逗号分隔。
</notes>
```'
- 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: 184.06078589047775
y: 6.447951724393619
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