647 lines
22 KiB
YAML
647 lines
22 KiB
YAML
app:
|
||
description: ''
|
||
icon: 🤖
|
||
icon_background: '#FFEAD5'
|
||
mode: workflow
|
||
name: 合同助手
|
||
use_icon_as_answer_icon: false
|
||
dependencies:
|
||
- current_identifier: null
|
||
type: marketplace
|
||
value:
|
||
marketplace_plugin_unique_identifier: langgenius/siliconflow:0.0.39@24cca06d03099357488b00b84ba59d39e76373478cb8b2cabd3a0a2aa1fe975b
|
||
version: null
|
||
- current_identifier: null
|
||
type: marketplace
|
||
value:
|
||
marketplace_plugin_unique_identifier: bowenliang123/md_exporter:2.2.0@9f39c2c2c1cd09180e2cc053090adc9886019483f502727467f136712b8b9639
|
||
version: null
|
||
- current_identifier: null
|
||
type: marketplace
|
||
value:
|
||
marketplace_plugin_unique_identifier: langgenius/deepseek:0.0.11@35bcd3f233f99d07bdadef8b326945df3bda5e8f773330144bc90d84800336b9
|
||
version: null
|
||
kind: app
|
||
version: 0.5.0
|
||
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_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: true
|
||
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: knowledge-retrieval
|
||
targetType: llm
|
||
id: 1770108318162-source-1770108337053-target
|
||
source: '1770108318162'
|
||
sourceHandle: source
|
||
target: '1770108337053'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInLoop: false
|
||
sourceType: llm
|
||
targetType: tool
|
||
id: 1770108337053-source-1770108739786-target
|
||
source: '1770108337053'
|
||
sourceHandle: source
|
||
target: '1770108739786'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: tool
|
||
targetType: code
|
||
id: 1770108739786-source-1770109395677-target
|
||
selected: false
|
||
source: '1770108739786'
|
||
sourceHandle: source
|
||
target: '1770109395677'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: code
|
||
targetType: http-request
|
||
id: 1770109395677-source-1770170304071-target
|
||
source: '1770109395677'
|
||
sourceHandle: source
|
||
target: '1770170304071'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: http-request
|
||
targetType: code
|
||
id: 1770170304071-source-1770171334605-target
|
||
source: '1770170304071'
|
||
sourceHandle: source
|
||
target: '1770171334605'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: code
|
||
targetType: end
|
||
id: 1770171334605-source-1770108424229-target
|
||
source: '1770171334605'
|
||
sourceHandle: source
|
||
target: '1770108424229'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: start
|
||
targetType: llm
|
||
id: 1770106628924-source-1770187316880-target
|
||
source: '1770106628924'
|
||
sourceHandle: source
|
||
target: '1770187316880'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
- data:
|
||
isInIteration: false
|
||
isInLoop: false
|
||
sourceType: llm
|
||
targetType: knowledge-retrieval
|
||
id: 1770187316880-source-1770108318162-target
|
||
source: '1770187316880'
|
||
sourceHandle: source
|
||
target: '1770108318162'
|
||
targetHandle: target
|
||
type: custom
|
||
zIndex: 0
|
||
nodes:
|
||
- data:
|
||
selected: false
|
||
title: 用户输入
|
||
type: start
|
||
variables:
|
||
- default: ''
|
||
hint: ''
|
||
label: 合同名称
|
||
max_length: 256
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: name
|
||
- default: ''
|
||
hint: ''
|
||
label: 合同编号
|
||
max_length: 256
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: number
|
||
- default: ''
|
||
hint: ''
|
||
label: 合同类型
|
||
max_length: 48
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: type
|
||
- default: ''
|
||
hint: ''
|
||
label: 项目名称
|
||
max_length: 2048
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: paragraph
|
||
variable: project_name_list
|
||
- default: ''
|
||
hint: ''
|
||
label: 乙方全称
|
||
max_length: 256
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: customer_name
|
||
- default: ''
|
||
hint: ''
|
||
label: 甲方全程
|
||
max_length: 256
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: org_name
|
||
- default: ''
|
||
hint: ''
|
||
label: 合同金额
|
||
max_length: 48
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: text-input
|
||
variable: amount
|
||
- default: ''
|
||
hint: ''
|
||
label: 付款说明及比例
|
||
max_length: 512
|
||
options: []
|
||
placeholder: ''
|
||
required: true
|
||
type: paragraph
|
||
variable: remark
|
||
height: 291
|
||
id: '1770106628924'
|
||
position:
|
||
x: 80
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 80
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
dataset_ids:
|
||
- 6uACYcOQ1t0C3/KHbn3tqeCHvEd4w2QFhEq/9948NnDQ6A/VUSeqwzivZhbajG2b
|
||
multiple_retrieval_config:
|
||
reranking_enable: true
|
||
reranking_mode: reranking_model
|
||
reranking_model:
|
||
model: netease-youdao/bce-reranker-base_v1
|
||
provider: langgenius/siliconflow/siliconflow
|
||
top_k: 4
|
||
query_attachment_selector: []
|
||
query_variable_selector:
|
||
- '1770187316880'
|
||
- text
|
||
retrieval_mode: multiple
|
||
selected: false
|
||
title: 知识检索
|
||
type: knowledge-retrieval
|
||
height: 90
|
||
id: '1770108318162'
|
||
position:
|
||
x: 682
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 682
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
context:
|
||
enabled: true
|
||
variable_selector:
|
||
- '1770108318162'
|
||
- result
|
||
model:
|
||
completion_params:
|
||
temperature: 0.7
|
||
mode: chat
|
||
name: deepseek-chat
|
||
provider: langgenius/deepseek/deepseek
|
||
prompt_template:
|
||
- id: 54faae96-2f1e-4a0c-b0a7-a6bf59d2a61b
|
||
role: system
|
||
text: "# Role\n你是一位拥有 10 年经验的中国资深法务专家,精通《中华人民共和国民法典》。你的专长是根据用户提供的核心要素,结合公司内部的标准合同范本,起草严谨、规范的法律合同。\n\
|
||
\n# Task\n请根据下方的 [Input Data] 和 [Retrieved Context](知识库检索到的合同范本),撰写一份完整的合同草案。\n\
|
||
\n# Input Data\n- 合同名称: {{#1770106628924.name#}}\n- 合同编号: {{#1770106628924.number#}}\n\
|
||
- 甲方信息: {{#1770106628924.org_name#}}\n- 乙方信息: {{#1770106628924.customer_name#}}\n\
|
||
- 项目列表: {{#1770106628924.project_name_list#}}\n- 合同总额: {{#1770106628924.amount#}}\
|
||
\ (请自动转换为大写金额)\n- 备注/特殊条款: {{#1770106628924.remark#}}(包含付款方式、分期比例、特殊交付要求等)\n\
|
||
\n# Context (Reference Templates)\n{{#context#}}\n*(注意:这是 Dify 检索到的知识库内容,请以此为骨架)*\n\
|
||
\n# Drafting Rules (必须严格遵守)\n\n1. **结构规范**:\n - 必须包含:合同封面、首部(双方信息)、引言(法律依据)、正文(条款)、尾部(签字盖章页)。\n\
|
||
\ - 法律依据必须引用《中华人民共和国民法典》。\n\n2. **类型自适应**:\n - **情形 A(政府/咨询类)**:如果合同名称包含“风险评估”、“咨询”、“专项债”,请参照《风险评估咨询技术服务合同》风格。\n\
|
||
\ - 强调“依据国家、省、市政策”。\n - 包含“不可预见情况”的变更条款。\n - **情形 B(设计/合作类)**:如果合同名称包含“设计”、“合作”、“外包”,请参照《设计合作协议》风格。\n\
|
||
\ - 必须明确交付物格式:Word、PDF 及 CAD。\n - 必须包含“禁止擅自转包/分包”条款。\n\n3. **核心条款强制要求**:\n\
|
||
\ - **违约责任**:必须包含赔偿范围,具体表述为:“包括但不限于直接经济损失、预期可期待利益、诉讼费、律师费、保全费、差旅费等”。\n\
|
||
\ - **保密例外**:必须包含“市场拓展宣传权”条款,即:“为了进行市场拓展,乙方可以披露曾为甲方工作的事实及一般性质,但不得泄露核心机密。”\n\
|
||
\ - **争议解决**:管辖法院统一设定为 **甲方所在地** 人民法院。\n\n4. **数据填充逻辑**:\n - 将 {{#1770106628924.amount#}}\
|
||
\ 填充至“费用与支付”条款,并根据 中的分期描{{#1770106628924.remark#}}述(如“30%首付”)自动生成分期付款明细。\n\
|
||
\ - 将 {{#1770106628924.project_name_list#}} 填充至“鉴于”或“项目背景”部分。\n\n5.\
|
||
\ **格式输出**:\n - 使用清晰的 Markdown 格式(# 标题, ## 条款)。\n - 不要输出任何“好的,我来为您生成”之类的废话,直接输出合同正文。\n\
|
||
\n# Output Example Structure\n## [合同名称]\n**合同编号**:[编号]\n\n**甲方**:[甲方全称]\n\
|
||
...\n**乙方**:[乙方全称]\n...\n\n### 第一条 法律依据\n...\n### 第二条 业务范围与工作内容\n...\n\
|
||
(根据备注生成的支付条款)\n...\n### [最后] 签字页"
|
||
selected: true
|
||
title: 合同
|
||
type: llm
|
||
vision:
|
||
enabled: false
|
||
height: 88
|
||
id: '1770108337053'
|
||
position:
|
||
x: 984
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 984
|
||
y: 282
|
||
selected: true
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
outputs:
|
||
- value_selector:
|
||
- '1770171334605'
|
||
- fileId
|
||
value_type: string
|
||
variable: file_id
|
||
selected: false
|
||
title: 输出
|
||
type: end
|
||
height: 88
|
||
id: '1770108424229'
|
||
position:
|
||
x: 3005.6255273523284
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 3005.6255273523284
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
is_team_authorization: true
|
||
paramSchemas:
|
||
- auto_generate: null
|
||
default: null
|
||
form: llm
|
||
human_description:
|
||
en_US: Markdown text
|
||
ja_JP: Markdown text
|
||
pt_BR: Markdown text
|
||
zh_Hans: Markdown格式文本
|
||
label:
|
||
en_US: Markdown text
|
||
ja_JP: Markdown text
|
||
pt_BR: Markdown text
|
||
zh_Hans: Markdown格式文本
|
||
llm_description: ''
|
||
max: null
|
||
min: null
|
||
name: md_text
|
||
options: []
|
||
placeholder: null
|
||
precision: null
|
||
required: true
|
||
scope: null
|
||
template: null
|
||
type: string
|
||
- auto_generate: null
|
||
default: null
|
||
form: llm
|
||
human_description:
|
||
en_US: Optional docx template file for styling。Use "Home"-"Styles Pane"
|
||
in Microsoft Word to edit styles of the docx file.
|
||
ja_JP: Optional docx template file for styling。Use "Home"-"Styles Pane"
|
||
in Microsoft Word to edit styles of the docx file.
|
||
pt_BR: Optional docx template file for styling。Use "Home"-"Styles Pane"
|
||
in Microsoft Word to edit styles of the docx file.
|
||
zh_Hans: 可选的docx模板文件,用于样式控制。使用Microsoft Word中“开始”-“样式窗格”对docx文件的样式进行编辑。
|
||
label:
|
||
en_US: DOCX Template File
|
||
ja_JP: DOCX Template File
|
||
pt_BR: DOCX Template File
|
||
zh_Hans: DOCX 模板文件
|
||
llm_description: An optional .pptx file that serves as a template for the
|
||
generated presentation
|
||
max: null
|
||
min: null
|
||
name: docx_template_file
|
||
options: []
|
||
placeholder: null
|
||
precision: null
|
||
required: false
|
||
scope: null
|
||
template: null
|
||
type: file
|
||
- auto_generate: null
|
||
default: null
|
||
form: llm
|
||
human_description:
|
||
en_US: Optional custom output file name, and the filename suffix is not
|
||
required.
|
||
ja_JP: Optional custom output file name, and the filename suffix is not
|
||
required.
|
||
pt_BR: Optional custom output file name, and the filename suffix is not
|
||
required.
|
||
zh_Hans: 可选的自定义输出文件名,后缀名无需指定
|
||
label:
|
||
en_US: Output Filename
|
||
ja_JP: Output Filename
|
||
pt_BR: Output Filename
|
||
zh_Hans: 输出文件名
|
||
llm_description: ''
|
||
max: null
|
||
min: null
|
||
name: output_filename
|
||
options: []
|
||
placeholder: null
|
||
precision: null
|
||
required: false
|
||
scope: null
|
||
template: null
|
||
type: string
|
||
params:
|
||
docx_template_file: ''
|
||
md_text: ''
|
||
output_filename: ''
|
||
plugin_id: bowenliang123/md_exporter
|
||
plugin_unique_identifier: bowenliang123/md_exporter:2.2.0@9f39c2c2c1cd09180e2cc053090adc9886019483f502727467f136712b8b9639
|
||
provider_icon: /console/api/workspaces/current/plugin/icon?tenant_id=bc2d392f-7f32-4b7e-aaa8-fa5e13acb772&filename=f0bad95cda1671b4e49f0e05df6122ef9ec5d554e138f128795d11d3806c00ef.svg
|
||
provider_id: bowenliang123/md_exporter/md_exporter
|
||
provider_name: bowenliang123/md_exporter/md_exporter
|
||
provider_type: builtin
|
||
selected: false
|
||
title: Markdown 转 DOCX 文件
|
||
tool_configurations: {}
|
||
tool_description: 将 Markdown 转换为 DOCX 文件的工具
|
||
tool_label: Markdown 转 DOCX 文件
|
||
tool_name: md_to_docx
|
||
tool_node_version: '2'
|
||
tool_parameters:
|
||
docx_template_file:
|
||
type: constant
|
||
value: null
|
||
md_text:
|
||
type: mixed
|
||
value: '{{#1770108337053.text#}}'
|
||
output_filename:
|
||
type: mixed
|
||
value: '{{#1770106628924.name#}}'
|
||
type: tool
|
||
height: 52
|
||
id: '1770108739786'
|
||
position:
|
||
x: 1419
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 1419
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
code: "\nfunction main({files}) {\n const file = files[0]\n\n return\
|
||
\ {\n url: file.url,\n filename: file.filename\n }\n}\n"
|
||
code_language: javascript
|
||
outputs:
|
||
filename:
|
||
children: null
|
||
type: string
|
||
url:
|
||
children: null
|
||
type: string
|
||
selected: false
|
||
title: 提取 file
|
||
type: code
|
||
variables:
|
||
- value_selector:
|
||
- '1770108739786'
|
||
- files
|
||
value_type: array[file]
|
||
variable: files
|
||
height: 52
|
||
id: '1770109395677'
|
||
position:
|
||
x: 1824
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 1824
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
authorization:
|
||
config: null
|
||
type: no-auth
|
||
body:
|
||
data:
|
||
- id: key-value-117
|
||
key: ''
|
||
type: text
|
||
value: "{\n \"url\":\"{{#1770109395677.url#}}\"\n \"fileName\":\"\
|
||
{{#1770109395677.filename#}}\"\n}"
|
||
type: json
|
||
headers: ''
|
||
method: post
|
||
params: ''
|
||
retry_config:
|
||
max_retries: 3
|
||
retry_enabled: true
|
||
retry_interval: 100
|
||
selected: false
|
||
ssl_verify: true
|
||
timeout:
|
||
max_connect_timeout: 0
|
||
max_read_timeout: 0
|
||
max_write_timeout: 0
|
||
title: HTTP 请求
|
||
type: http-request
|
||
url: http://129.28.93.36:3123/file/upload-url
|
||
variables: []
|
||
height: 137
|
||
id: '1770170304071'
|
||
position:
|
||
x: 2200.6280674679188
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 2200.6280674679188
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
code: "\nfunction main({arg1, id}) {\n const res = JSON.parse(arg1)\n \
|
||
\ if (res.code === 200){\n const fileId = res.data.id\n \
|
||
\ return {\n fileId: fileId\n }\n }\n return {\n\
|
||
\ error: \"文件上传失败\"\n }\n}\n"
|
||
code_language: javascript
|
||
outputs:
|
||
fileId:
|
||
children: null
|
||
type: string
|
||
selected: false
|
||
title: 提取文件 id 和 项目 id
|
||
type: code
|
||
variables:
|
||
- value_selector:
|
||
- '1770170304071'
|
||
- body
|
||
value_type: string
|
||
variable: arg1
|
||
height: 52
|
||
id: '1770171334605'
|
||
position:
|
||
x: 2567.126350783164
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 2567.126350783164
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
- data:
|
||
context:
|
||
enabled: false
|
||
variable_selector: []
|
||
desc: ''
|
||
model:
|
||
completion_params:
|
||
temperature: 0.7
|
||
mode: chat
|
||
name: deepseek-chat
|
||
provider: langgenius/deepseek/deepseek
|
||
prompt_template:
|
||
- id: 008dcdb9-e4f6-43a3-bca2-227512323bba
|
||
role: system
|
||
text: "# Role\n你是一名资深的法务助理,专门负责在公司的合同数据库中检索最匹配的合同范本和条款。\n\n# Task\n根据用户提供的合同元数据,分析其业务实质,并将其转换为一段“用于检索向量数据库”的精准关键词或描述性语句。\n\
|
||
\n# Input Data\n- 合同类型 (Type): {{#1770106628924.type#}}\n- 项目名称 (Project\
|
||
\ List): {{#1770106628924.project_name_list#}}\n- 备注要求 (Remark): {{#1770106628924.remark#}}\n\
|
||
- 乙方名称 (Customer Name): {{#1770106628924.customer_name#}}\n- 甲方名称: {{#1770106628924.org_name#}}\n\
|
||
- 合同总金额:{{#1770106628924.amount#}}\n- 合同名称:{{#1770106628924.name#}}\n\n\
|
||
# Rules for Query Generation\n1. **识别核心范本**:\n - 如果 Input 暗示是政府、公家单位、发债、评估,关键词必须包含“专项债券项目风险评估咨询技术服务合同”。\n\
|
||
\ - 如果 Input 暗示是设计院、个人合作、画图,关键词必须包含“设计合作协议”。\n2. **提取特殊条款需求**:\n -\
|
||
\ 从 `remark` 中提取关键约束(如:分期付款、保密期、违约金比例、知识产权归属)。\n3. **输出格式**:\n - 仅输出一段纯文本,包含:核心合同范本名称\
|
||
\ + 关键业务场景 + 特殊条款关键词。\n - 不要输出任何解释性文字。\n\n# Example Output\n专项债券项目风险评估咨询技术服务合同\
|
||
\ 政府对公业务 分期付款 违约责任 知识产权归属"
|
||
selected: false
|
||
title: 查询重写
|
||
type: llm
|
||
vision:
|
||
enabled: false
|
||
height: 88
|
||
id: '1770187316880'
|
||
position:
|
||
x: 382
|
||
y: 282
|
||
positionAbsolute:
|
||
x: 382
|
||
y: 282
|
||
selected: false
|
||
sourcePosition: right
|
||
targetPosition: left
|
||
type: custom
|
||
width: 242
|
||
viewport:
|
||
x: -304.92567306294177
|
||
y: 270.1161833988058
|
||
zoom: 1.1371907472107188
|
||
rag_pipeline_variables: []
|