Skip to content

Commit 95583a6

Browse files
authored
docs(tasks): add descriptions (#46)
1 parent 46871cd commit 95583a6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tasks/translator/task.oo.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ executor:
44
entry: __init__.py
55
inputs_def:
66
- handle: source_file
7+
description: The original EPUB file to be translated
78
json_schema:
89
type: string
910
ui:widget: file
@@ -14,6 +15,8 @@ inputs_def:
1415
extensions:
1516
- .epub
1617
- handle: translated_file
18+
description: The saved path of the translated EPUB file. If not filled in,
19+
specify an path.
1720
json_schema:
1821
type: string
1922
ui:widget: save
@@ -26,6 +29,7 @@ inputs_def:
2629
value:
2730
nullable: true
2831
- handle: language
32+
description: Translation target language
2933
json_schema:
3034
enum:
3135
- zh-Hans
@@ -54,6 +58,9 @@ inputs_def:
5458
- Korean
5559
value: zh-Hans
5660
- handle: prompt
61+
description: Provide LLM with necessary information for translating books. For
62+
example, you can fill in the glossary and character name specifications.
63+
Just tell LLM with natural language description.
5764
json_schema:
5865
type: string
5966
ui:widget: text
@@ -62,20 +69,29 @@ inputs_def:
6269
- group: LLM
6370
collapsed: true
6471
- handle: max_chunk_tokens
72+
description: The entire book will be split into many chunks and submitted to LLM
73+
in batches. this number is used to limit the number of tokens in each
74+
chunk.
6575
json_schema:
6676
type: integer
6777
value: 2048
6878
- handle: threads
79+
description: The number of threads opened at the same time to initiate requests
80+
to LLM, the more threads, the faster the analysis speed.
6981
json_schema:
7082
type: integer
7183
minimum: 1
7284
value: 4
7385
- handle: retry_times
86+
description: The number of retries after an LLM request fails is limited. If a
87+
request exceeds this number, an error will be reported and the request
88+
will be exited.
7489
json_schema:
7590
type: integer
7691
minimum: 1
7792
value: 5
7893
- handle: retry_interval_seconds
94+
description: How long (in seconds) after a failed LLM request starts the next retry
7995
json_schema:
8096
type: number
8197
minimum: 0
@@ -92,6 +108,7 @@ inputs_def:
92108
max_tokens: 4096
93109
outputs_def:
94110
- handle: translated_file
111+
description: Translated EPUB file path.
95112
json_schema:
96113
type: string
97114
ui:widget: save
@@ -101,3 +118,6 @@ outputs_def:
101118
extensions:
102119
- .epub
103120
title: Translate a book
121+
description: Use LLM to translate epub ebooks. The translated book will retain
122+
the original text and list the translation side by side with the original
123+
text.

0 commit comments

Comments
 (0)