-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpdf_document_translator.yml
More file actions
475 lines (475 loc) · 11.8 KB
/
pdf_document_translator.yml
File metadata and controls
475 lines (475 loc) · 11.8 KB
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
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: 科学论文PDF翻译助手
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.2.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_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
isInLoop: false
sourceType: loop
targetType: http-request
id: 1747882024175--1747882339414-target
source: '1747882024175'
sourceHandle: source
target: '1747882339414'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: http-request
targetType: code
id: 1747309216938-source-1747881988364-target
source: '1747309216938'
sourceHandle: source
target: '1747881988364'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: http-request
targetType: end
id: 1747882339414-source-1747900604360-target
source: '1747882339414'
sourceHandle: source
target: '1747900604360'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: true
loop_id: '1747882024175'
sourceType: loop-start
targetType: code
id: 1747882024175start-source-1747903273440-target
source: 1747882024175start
sourceHandle: source
target: '1747903273440'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInLoop: false
sourceType: start
targetType: http-request
id: 1747308980054-source-1747309216938-target
source: '1747308980054'
sourceHandle: source
target: '1747309216938'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: loop
targetType: http-request
id: 1747882024175-source-17479064065390-target
source: '1747882024175'
sourceHandle: source
target: '17479064065390'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: http-request
targetType: end
id: 17479064065390-source-1747900604360-target
source: '17479064065390'
sourceHandle: source
target: '1747900604360'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: code
targetType: loop
id: 1747881988364-source-1747882024175-target
source: '1747881988364'
sourceHandle: source
target: '1747882024175'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: 开始
type: start
variables:
- allowed_file_extensions:
- .pdf
allowed_file_types:
- custom
allowed_file_upload_methods:
- local_file
- remote_url
label: 源文件
max_length: 48
options: []
required: true
type: file
variable: source_file
- label: 服务地址
max_length: 64
options: []
required: true
type: text-input
variable: server_url
height: 116
id: '1747308980054'
position:
x: -154.3690115326326
y: 167.08732564491157
positionAbsolute:
x: -154.3690115326326
y: 167.08732564491157
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
authorization:
config: null
type: no-auth
body:
data:
- id: key-value-365
key: data
type: text
value: '{"lang_in":"en","lang_out":"zh","service":"bing","thread":4}'
- file:
- '1747308980054'
- source_file
id: key-value-390
key: file
type: file
value: ''
- id: key-value-165
key: ''
type: text
value: ''
type: form-data
desc: 请求PDF翻译服务
headers: ''
method: post
params: ''
retry_config:
max_retries: 1
retry_enabled: false
retry_interval: 100
selected: false
ssl_verify: true
timeout:
max_connect_timeout: 0
max_read_timeout: 0
max_write_timeout: 0
title: 添加翻译任务
type: http-request
url: '{{#1747308980054.server_url#}}/v1/translate'
variables: []
height: 141
id: '1747309216938'
position:
x: 248.04199973328986
y: 167.08732564491157
positionAbsolute:
x: 248.04199973328986
y: 167.08732564491157
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\nimport json\ndef main(arg1: str) -> dict:\n return json.loads(arg1)\n"
code_language: python3
desc: ''
outputs:
id:
children: null
type: string
selected: false
title: 解析结果
type: code
variables:
- value_selector:
- '1747309216938'
- body
variable: arg1
height: 54
id: '1747881988364'
position:
x: 591.7886689172627
y: 167.08732564491157
positionAbsolute:
x: 591.7886689172627
y: 167.08732564491157
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
break_conditions:
- comparison_operator: is
id: 9cb57b1d-b29a-40d6-b610-bbf9a5c37ae9
value: SUCCESS
varType: string
variable_selector:
- '1747903273440'
- state
desc: ''
error_handle_mode: terminated
height: 152
logical_operator: and
loop_count: 100
loop_variables: []
selected: false
start_node_id: 1747882024175start
title: 循环查询进度
type: loop
width: 411
height: 152
id: '1747882024175'
position:
x: 922.7614418539827
y: 167.08732564491157
positionAbsolute:
x: 922.7614418539827
y: 167.08732564491157
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 411
zIndex: 1
- data:
desc: ''
isInLoop: true
selected: false
title: ''
type: loop-start
draggable: false
height: 48
id: 1747882024175start
parentId: '1747882024175'
position:
x: 24
y: 68
positionAbsolute:
x: 946.7614418539827
y: 235.08732564491157
selectable: false
sourcePosition: right
targetPosition: left
type: custom-loop-start
width: 44
zIndex: 1002
- data:
authorization:
config: null
type: no-auth
body:
data: []
type: none
desc: ''
headers: ''
method: get
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: 下载mono类型文件
type: http-request
url: '{{#1747308980054.server_url#}}/v1/translate/{{#1747881988364.id#}}/mono'
variables: []
height: 162
id: '1747882339414'
position:
x: 1497.575297266601
y: 75.89728459794782
positionAbsolute:
x: 1497.575297266601
y: 75.89728459794782
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1747882339414'
- files
variable: mono
- value_selector:
- '17479064065390'
- files
variable: dual
selected: false
title: 结束
type: end
height: 116
id: '1747900604360'
position:
x: 1914.3848327166152
y: 181.08732564491157
positionAbsolute:
x: 1914.3848327166152
y: 181.08732564491157
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "import requests\nimport time\n\ndef main(arg1: str, arg2: str) -> dict:\n\
\ url = f'{arg1}/v1/translate/{arg2}'\n response = requests.get(url)\n\
\ res = response.json()\n state = res['state']\n if state == 'PROGRESS':\n\
\ time.sleep(5)\n return {\n \"state\": state\n }\n"
code_language: python3
desc: ''
isInIteration: false
isInLoop: true
loop_id: '1747882024175'
outputs:
state:
children: null
type: string
selected: false
title: 请求进度
type: code
variables:
- value_selector:
- '1747308980054'
- server_url
variable: arg1
- value_selector:
- '1747881988364'
- id
variable: arg2
height: 54
id: '1747903273440'
parentId: '1747882024175'
position:
x: 121.17927545070324
y: 65
positionAbsolute:
x: 1043.940717304686
y: 232.08732564491157
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
authorization:
config: null
type: no-auth
body:
data: []
type: none
desc: ''
headers: ''
method: get
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: 下载dual类型文件
type: http-request
url: '{{#1747308980054.server_url#}}/v1/translate/{{#1747881988364.id#}}/dual'
variables: []
height: 162
id: '17479064065390'
position:
x: 1497.575297266601
y: 302.84375477302035
positionAbsolute:
x: 1497.575297266601
y: 302.84375477302035
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -611.5129480737553
y: 273.7611912230021
zoom: 0.6597539553864471