Skip to content

Commit b5d6b45

Browse files
committed
feat(tasks): add group
1 parent be917ac commit b5d6b45

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

flows/playground/.flow.ui.oo.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
"x": 161.13268069692018,
77
"y": 160.15180173592177
88
}
9+
},
10+
"sections": {
11+
"inputs": {
12+
"collapsed": {
13+
"prompt": {
14+
"[]": false
15+
}
16+
}
17+
}
918
}
1019
}
1120
},

tasks/translator/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import typing
1111
from oocana import LLMModelOptions
1212
class Inputs(typing.TypedDict):
13-
model: LLMModelOptions
1413
source_file: str
1514
translated_file: str | None
1615
language: typing.Literal["zh-Hans", "zh-Hant", "en", "fr", "de", "es", "ru", "it", "pt", "ja", "ko"]
@@ -19,6 +18,7 @@ class Inputs(typing.TypedDict):
1918
threads: int
2019
retry_times: int
2120
retry_interval_seconds: float
21+
model: LLMModelOptions
2222
class Outputs(typing.TypedDict):
2323
translated_file: str
2424
#endregion

tasks/translator/task.oo.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ executor:
33
options:
44
entry: __init__.py
55
inputs_def:
6-
- handle: model
7-
json_schema:
8-
ui:options:
9-
title: Model
10-
ui:widget: llm::model
11-
value:
12-
model: oomol-chat
13-
temperature: 0
14-
top_p: 0.5
15-
max_tokens: 4096
166
- handle: source_file
177
json_schema:
188
type: string
@@ -69,6 +59,8 @@ inputs_def:
6959
ui:widget: text
7060
value:
7161
nullable: true
62+
- group: LLM
63+
collapsed: true
7264
- handle: max_chunk_tokens
7365
json_schema:
7466
type: integer
@@ -88,6 +80,16 @@ inputs_def:
8880
type: number
8981
minimum: 0
9082
value: 6.5
83+
- handle: model
84+
json_schema:
85+
ui:options:
86+
title: Model
87+
ui:widget: llm::model
88+
value:
89+
model: oomol-chat
90+
temperature: 0
91+
top_p: 0.5
92+
max_tokens: 4096
9193
outputs_def:
9294
- handle: translated_file
9395
json_schema:

0 commit comments

Comments
 (0)