-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLanguageConsistencyChecker.yml
773 lines (715 loc) · 22.5 KB
/
LanguageConsistencyChecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: 三语一致性检查
use_icon_as_answer_icon: false
kind: app
version: 0.1.3
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: 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
sourceType: start
targetType: tool
id: 1731078730206-source-17310793844280-target
selected: false
source: '1731078730206'
sourceHandle: source
target: '17310793844280'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: start
targetType: tool
id: 1731078730206-source-17310794023810-target
selected: false
source: '1731078730206'
sourceHandle: source
target: '17310794023810'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: start
targetType: tool
id: 1731078730206-source-1732344950523-target
selected: false
source: '1731078730206'
sourceHandle: source
target: '1732344950523'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: llm
id: 1732346962510-source-17323455383030-target
selected: false
source: '1732346962510'
sourceHandle: source
target: '17323455383030'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: llm
id: 1732346962510-source-1731079450460-target
selected: false
source: '1732346962510'
sourceHandle: source
target: '1731079450460'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: llm
id: 1732346962510-source-17323455402970-target
selected: false
source: '1732346962510'
sourceHandle: source
target: '17323455402970'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: end
id: 17323455383030-source-1731079485152-target
source: '17323455383030'
sourceHandle: source
target: '1731079485152'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: end
id: 1731079450460-source-1731079485152-target
source: '1731079450460'
sourceHandle: source
target: '1731079485152'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: llm
targetType: end
id: 17323455402970-source-1731079485152-target
source: '17323455402970'
sourceHandle: source
target: '1731079485152'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: code
id: 1732377867403-source-1732346962510-target
source: '1732377867403'
sourceHandle: source
target: '1732346962510'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: tool
targetType: code
id: 1732344950523-source-1732377867403-target
source: '1732344950523'
sourceHandle: source
target: '1732377867403'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: tool
targetType: code
id: 17310793844280-source-1732378541085-target
source: '17310793844280'
sourceHandle: source
target: '1732378541085'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: code
id: 1732378541085-source-1732346962510-target
source: '1732378541085'
sourceHandle: source
target: '1732346962510'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: tool
targetType: code
id: 17310794023810-source-1732378574421-target
source: '17310794023810'
sourceHandle: source
target: '1732378574421'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: code
id: 1732378574421-source-1732346962510-target
source: '1732378574421'
sourceHandle: source
target: '1732346962510'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: 开始
type: start
variables:
- label: URL后缀
max_length: 90
options: []
required: true
type: text-input
variable: url
- label: 基准语言
max_length: 48
options: []
required: true
type: text-input
variable: lang
height: 116
id: '1731078730206'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
provider_id: jina
provider_name: jina
provider_type: builtin
selected: false
title: 英文
tool_configurations:
gather_all_images_at_the_end: 0
gather_all_links_at_the_end: 0
image_caption: 0
max_retries: 3
no_cache: 0
proxy_server: null
summary: 0
target_selector: null
wait_for_selector: null
tool_label: 获取单页面
tool_name: jina_reader
tool_parameters:
url:
type: mixed
value: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/en/{{#1731078730206.url#}}
type: tool
height: 298
id: '17310793844280'
position:
x: 533.9453673454243
y: 358.6282645572012
positionAbsolute:
x: 533.9453673454243
y: 358.6282645572012
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
provider_id: jina
provider_name: jina
provider_type: builtin
selected: false
title: 日文
tool_configurations:
gather_all_images_at_the_end: 0
gather_all_links_at_the_end: 0
image_caption: 0
max_retries: 3
no_cache: 0
proxy_server: null
summary: 0
target_selector: null
wait_for_selector: null
tool_label: 获取单页面
tool_name: jina_reader
tool_parameters:
url:
type: mixed
value: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/jp/{{#1731078730206.url#}}
type: tool
height: 298
id: '17310794023810'
position:
x: 527.2710872750391
y: 783.919470970977
positionAbsolute:
x: 527.2710872750391
y: 783.919470970977
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
frequency_penalty: 0.5
presence_penalty: 0.5
temperature: 0.7
top_p: 0.75
mode: chat
name: claude-3-5-sonnet-20241022
provider: openai_api_compatible
prompt_template:
- id: 22f11f37-ae52-4ae1-a171-476163e865e7
role: system
text: '## 角色
你是一个掌握多语言的文档审核专家,精通xml和markdown还有英文。你需要检查不同语言的Markdown格式文件之间有无翻译错误,以及有无漏翻译。
## 文件内容
需要检查的内容如下:
英文版本:{{#1732378541085.result#}}
基准版本:{{#1732346962510.result#}}
## 格式要求
- 你需要与基准版本对比,将英文版本修正后的内容输出,将建议需要修改的内容使用xml格式的标签标记出来。
- 删除多余内容的格式:<rm>多余内容</rm>
- 添加内容的格式:<add>添加内容</add>
- 如果需要修改内容,你需要先用<rm></rm>删除原文内容,然后再用<add></add>加入修改内容。
- 你需要对语法进行检查,如果有语法不正确的地方需要纠正
- 作为文档专家你熟悉英文的本土表达,你需要把不专业的词汇表达或者低质量翻译换为更合理的表达
- 输出结果中你不能输出多余的废话,废话是文章正文以外的和用户对话性质的内容
- 在开头不可以尝试和用户对话,你应该直接输出修改结果
- 不可以使用<rm></rm>或<add></add>之外的标注方式对原文进行修改
- 保证除了修改内容之外的内容与原文完全一致
- 请注意:如果没有需要修改的内容或者用户选择的基准语言:{{#1731078730206.lang#}}是英文,你不可以使用<add>和<rm>标签对原文进行增改,只能原封不动地输出以下内容:{{#1732378541085.result#}}'
selected: false
title: 英文检查
type: llm
variables: []
vision:
enabled: false
height: 98
id: '1731079450460'
position:
x: 2072.8255731326944
y: 406.64115079677777
positionAbsolute:
x: 2072.8255731326944
y: 406.64115079677777
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '17323455383030'
- text
variable: cn
- value_selector:
- '1731079450460'
- text
variable: en
- value_selector:
- '17323455402970'
- text
variable: jp
selected: false
title: 结束
type: end
height: 142
id: '1731079485152'
position:
x: 2568.7024671163795
y: 393.1862416685342
positionAbsolute:
x: 2568.7024671163795
y: 393.1862416685342
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
provider_id: jina
provider_name: jina
provider_type: builtin
selected: false
title: 中文
tool_configurations:
gather_all_images_at_the_end: 0
gather_all_links_at_the_end: 0
image_caption: 0
max_retries: 3
no_cache: 0
proxy_server: null
summary: 0
target_selector: null
wait_for_selector: null
tool_label: Fetch Single Page
tool_name: jina_reader
tool_parameters:
url:
type: mixed
value: https://raw.githubusercontent.com/langgenius/dify-docs/refs/heads/main/zh_CN/{{#1731078730206.url#}}
type: tool
height: 298
id: '1732344950523'
position:
x: 527.2710872750391
y: -59.349039228713906
positionAbsolute:
x: 527.2710872750391
y: -59.349039228713906
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
frequency_penalty: 0.5
presence_penalty: 0.5
temperature: 0.7
top_p: 0.75
mode: chat
name: claude-3-5-sonnet-20241022
provider: openai_api_compatible
prompt_template:
- id: 22f11f37-ae52-4ae1-a171-476163e865e7
role: system
text: '## 角色
你是一个掌握多语言的文档审核专家,精通xml和markdown还有中文。你需要检查不同语言的Markdown格式文件之间有无翻译错误,以及有无漏翻译。
## 文件内容
需要检查的内容如下:
中文版本:{{#1732377867403.result#}}
基准版本:{{#1732346962510.result#}}
## 格式要求
- 你需要与基准版本对比,将中文版本修正后的内容输出,将建议需要修改的内容使用xml格式的标签标记出来。
- 删除多余内容的格式:<rm>多余内容</rm>
- 添加内容的格式:<add>添加内容</add>
- 如果需要修改内容,你需要先用<rm></rm>删除原文内容,然后再用<add></add>加入修改内容。
- 你需要对语法进行检查,如果有语法不正确的地方需要纠正
- 作为文档专家你熟悉中文的本土表达,你需要把不专业的词汇表达或者低质量翻译换为更合理的表达
- 输出结果中你不能输出多余的废话,废话是文章正文以外的和用户对话性质的内容
- 在开头不可以尝试和用户对话,你应该直接输出修改结果
- 不可以使用<rm></rm>或<add></add>之外的标注方式对原文进行修改
- 保证除了修改内容之外的内容与原文完全一致
- 请注意:如果没有需要修改的内容或者用户选择的基准语言:{{#1731078730206.lang#}}是中文,你不可以使用<add>和<rm>标签对原文进行增改,只能原封不动地输出以下内容:{{#1732377867403.result#}}'
selected: false
title: 中文检查
type: llm
variables: []
vision:
enabled: false
height: 98
id: '17323455383030'
position:
x: 2072.8255731326944
y: 102.14288050255536
positionAbsolute:
x: 2072.8255731326944
y: 102.14288050255536
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
frequency_penalty: 0.5
presence_penalty: 0.5
temperature: 0.7
top_p: 0.75
mode: chat
name: claude-3-5-sonnet-20241022
provider: openai_api_compatible
prompt_template:
- id: 22f11f37-ae52-4ae1-a171-476163e865e7
role: system
text: '## 角色
你是一个掌握多语言的文档审核专家,精通xml和markdown还有日语。你需要检查不同语言的Markdown格式文件之间有无翻译错误,以及有无漏翻译。
## 文件内容
需要检查的内容如下:
日文版本:{{#1732378574421.result#}}
基准版本:{{#1732346962510.result#}}
## 格式要求
- 你需要与基准版本对比,将日文版本修正后的内容输出,将建议需要修改的内容使用xml格式的标签标记出来。
- 删除多余内容的格式:<rm>多余内容</rm>
- 添加内容的格式:<add>添加内容</add>
- 如果需要修改内容,你需要先用<rm></rm>删除原文内容,然后再用<add></add>加入修改内容。
- 你需要对语法进行检查,如果有语法不正确的地方需要纠正
- 作为文档专家你熟悉日文的本土表达,你需要把不专业的词汇表达或者低质量翻译换为更合理的表达
- 输出结果中你不能输出多余的废话,废话是文章正文以外的和用户对话性质的内容
- 在开头不可以尝试和用户对话,你应该直接输出修改结果
- 不可以使用<rm></rm>或<add></add>之外的标注方式对原文进行修改
- 保证除了修改内容之外的内容与原文完全一致
- 请注意:如果没有需要修改的内容或者用户选择的基准语言:{{#1731078730206.lang#}}是日文,你不可以使用<add>和<rm>标签对原文进行增改,只能原封不动地输出以下内容:{{#1732378574421.result#}}
'
selected: true
title: 日文检查
type: llm
variables: []
vision:
enabled: false
height: 98
id: '17323455402970'
position:
x: 2072.8255731326944
y: 640.9413723280669
positionAbsolute:
x: 2072.8255731326944
y: 640.9413723280669
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main(cn: str, en: str, jp: str, lang: str) -> dict:\n language_map\
\ = {\n \"zh-Hans\": cn,\n \"en-US\": en,\n \"ja-JP\"\
: jp\n }\n return {\n \"result\": language_map.get(lang, \"\
\")\n }"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 基准语言设置
type: code
variables:
- value_selector:
- '1732377867403'
- result
variable: cn
- value_selector:
- '1732378541085'
- result
variable: en
- value_selector:
- '1732378574421'
- result
variable: jp
- value_selector:
- '1731078730206'
- lang
variable: lang
height: 54
id: '1732346962510'
position:
x: 1628.3858541464047
y: 457.0940369487137
positionAbsolute:
x: 1628.3858541464047
y: 457.0940369487137
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "def main(text: str) -> dict:\n import json\n try:\n #\
\ 解析JSON字符串\n parsed_data = json.loads(text)\n # 从data字段中提取content\n\
\ content = parsed_data.get(\"data\", {}).get(\"content\", \"\")\n\
\ return {\n \"result\": content\n }\n except\
\ json.JSONDecodeError:\n return {\n \"result\": \"\"\n\
\ }"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 处理中文
type: code
variables:
- value_selector:
- '1732344950523'
- text
variable: text
height: 54
id: '1732377867403'
position:
x: 926.0750652029874
y: 131.06194706601627
positionAbsolute:
x: 926.0750652029874
y: 131.06194706601627
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "def main(text: str) -> dict:\n import json\n try:\n #\
\ 解析JSON字符串\n parsed_data = json.loads(text)\n # 从data字段中提取content\n\
\ content = parsed_data.get(\"data\", {}).get(\"content\", \"\")\n\
\ return {\n \"result\": content\n }\n except\
\ json.JSONDecodeError:\n return {\n \"result\": \"\"\n\
\ }"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 处理英文
type: code
variables:
- value_selector:
- '17310793844280'
- text
variable: text
height: 54
id: '1732378541085'
position:
x: 941.7990259561811
y: 448.62187205755816
positionAbsolute:
x: 941.7990259561811
y: 448.62187205755816
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "def main(text: str) -> dict:\n import json\n try:\n #\
\ 解析JSON字符串\n parsed_data = json.loads(text)\n # 从data字段中提取content\n\
\ content = parsed_data.get(\"data\", {}).get(\"content\", \"\")\n\
\ return {\n \"result\": content\n }\n except\
\ json.JSONDecodeError:\n return {\n \"result\": \"\"\n\
\ }"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 处理日文
type: code
variables:
- value_selector:
- '17310794023810'
- text
variable: text
height: 54
id: '1732378574421'
position:
x: 926.0750652029874
y: 702.786818792227
positionAbsolute:
x: 926.0750652029874
y: 702.786818792227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -936.227683354522
y: 1.9704134408573282
zoom: 0.7535779469905294