Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tasks/translator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from oocana import LLMModelOptions
class Inputs(typing.TypedDict):
source_file: str
translated_file: str | None
language: typing.Literal["zh-Hans", "zh-Hant", "en", "fr", "de", "es", "ru", "it", "pt", "ja", "ko"]
write_mode: typing.Literal["append", "replace"]
translated_file: str | None
prompt: str | None
max_chunk_tokens: int
threads: int
Expand Down
36 changes: 18 additions & 18 deletions tasks/translator/task.oo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,6 @@ inputs_def:
- name: EPUB
extensions:
- .epub
- handle: translated_file
description: "%the-saved-path-of-the-translated-epub-file-if-not-filled-in-spec%"
json_schema:
type: string
ui:widget: save
ui:options:
excludeAll: true
filters:
- name: EPUE
extensions:
- .epub
value:
nullable: true
- group: Translate
collapsed: false
- handle: language
description: "%translation-target-language%"
json_schema:
Expand Down Expand Up @@ -59,7 +44,7 @@ inputs_def:
- Korean
value: zh-Hans
- handle: write_mode
description: '%how-is-the-translation-written-into-an-epub-file-is-it-append-to%'
description: "%how-is-the-translation-written-into-an-epub-file-is-it-append-to%"
json_schema:
enum:
- append
Expand All @@ -69,6 +54,21 @@ inputs_def:
- Append
- Replace
value: append
- group: Translate
collapsed: true
- handle: translated_file
description: '%the-saved-path-of-the-translated-epub-file-if-not-filled-in-spec%'
json_schema:
type: string
ui:widget: save
ui:options:
excludeAll: true
filters:
- name: EPUE
extensions:
- epub
value:
nullable: true
Comment on lines +57 to +71

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in filter name.

Line 67 contains a typo: "EPUE" should be "EPUB". This typo could cause the file filter to display incorrectly in the UI.

Apply this diff to fix the typo:

-          - name: EPUE
+          - name: EPUB
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- group: Translate
collapsed: true
- handle: translated_file
description: '%the-saved-path-of-the-translated-epub-file-if-not-filled-in-spec%'
json_schema:
type: string
ui:widget: save
ui:options:
excludeAll: true
filters:
- name: EPUE
extensions:
- epub
value:
nullable: true
- group: Translate
collapsed: true
- handle: translated_file
description: '%the-saved-path-of-the-translated-epub-file-if-not-filled-in-spec%'
json_schema:
type: string
ui:widget: save
ui:options:
excludeAll: true
filters:
- name: EPUB
extensions:
- epub
value:
nullable: true
🤖 Prompt for AI Agents
In tasks/translator/task.oo.yaml around lines 57 to 71, the file filter name
"EPUE" is a typo and should be "EPUB"; update the filters -> - name: EPUE to -
name: EPUB so the UI file filter displays correctly (keep the extensions list
unchanged).

- handle: prompt
description: "%provide-llm-with-necessary-information-for-translating-books-for%"
json_schema:
Expand Down Expand Up @@ -110,8 +110,8 @@ inputs_def:
value:
model: deepseek-chat
temperature: 0.5
top_p: 0.5
max_tokens: 4096
top_p: 1
max_tokens: 8100
outputs_def:
- handle: translated_file
description: "%translated-epub-file-path%"
Expand Down