ZHU PEIYAN
4e7cbb5e32
feat(translator): 优化 Gemini 翻译模板(吴恩达三步翻译法)并支持新模型 ( #439 )
...
* feat(translator): 优化 Gemini 翻译模板并支持新模型
更新翻译提示模板以提供更专业的中文翻译输出,主要变更包括:
- 添加新的 Gemini 2.0 flash 实验模型支持
- 修改翻译提示模板,采用三步翻译流程提升翻译质量
- 增加标签提取功能,只返回最终优化后的翻译内容
- 移除对 {language} 参数的强制要求检查
优化后的翻译流程包含初次翻译、反思改进和最终润色三个步骤,
显著提升翻译结果的准确性和可读性。
* support md file type
---------
Co-authored-by: zhonghua.zhu <zhonghua.zhu@riveretech.com>
2024-12-22 18:59:42 +08:00
cce
b80f1ba785
Add context and system message support for Claude ( #438 )
...
* option to select claude model
* add context_flag and context_paragraph_limit option for claude
* reformat with black
* remove nonexistent model
2024-12-08 07:06:38 +08:00
cce
daea974d68
Pass --context_paragraph_limit option from CLI ( #437 )
2024-12-07 12:28:30 +08:00
Xie Yanbo
546fbd8e37
Avoid crash if not provide book_name ( #431 )
2024-11-06 17:57:38 +08:00
Xie Yanbo
78fc7985d5
support xAI ( #430 )
2024-11-06 17:56:59 +08:00
risin42
9261d92e20
Gemini Enhancements ( #428 )
...
* chore: Bump google-generativeai and related dependencies
* feat: add support for --temperature option to gemini
* feat: add support for --interval option to gemini
* feat: add support for --model_list option to gemini
* feat: add support for --prompt option to gemini
* modify: model settings
* feat: add support for --use_context option to gemini
* feat: add support for rotate_key to gemini
* feat: add exponential backoff to gemini
* Update README.md
* fix: typos and apply black formatting
* Update make_test_ebook.yaml
* fix: cli
* fix: interval option implementation
* fix: interval for geminipro
* fix: recreate convo after rotating key
2024-10-21 13:42:33 +08:00
mkXultra
6912206cb1
support: gpt4o ( #425 )
...
* support: gpt4o
* fix: remove wrong code
* fix: fix ci error
2024-08-24 19:20:15 +08:00
mkXultra
9e4e7b59c7
supprt openai batch api ( #423 )
...
* feat: support batch api
2024-08-20 16:17:48 +08:00
mkXultra
825381606a
feat: enable context flag and add context paragraph limit on chatgpt … ( #420 )
2024-08-14 22:07:31 +08:00
mkXultra
32f4eb3566
feat: support model gpt4o-mini ( #419 )
2024-08-08 18:16:58 +08:00
yihong0618
a4df3d77b3
fix : #404
2024-05-28 10:57:23 +08:00
umm
a9220ea6bf
feat: support groq translator ( #399 )
...
* feat: support Tencent TranSmart
* feat: support groq translator
2024-05-10 20:48:13 +08:00
b1tg
1ca0e78558
add ollama support ( #396 )
...
* add ollama support
* fix format
---------
Co-authored-by: b1tg <b1tg@users.noreply.github.com>
2024-04-22 16:16:33 +08:00
Timothy Blumberg
2f92e3dee5
Add a model named "openai" and "--model_list" option ( #392 )
...
* Add a model named "openai" and "--model_list" option
* Remove old code
* Fix whitespace issues
2024-04-04 21:02:07 +08:00
yihong0618
9c53374955
fix : #379
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-30 22:05:28 +08:00
yihong0618
365d6628bf
fix : #375
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-28 15:24:44 +08:00
Ninzore
40aaa9b090
Feat: combine multiple lines into one block, add a new option --block_size ( #370 )
...
* Feat: combine multiple lines into one block
bug: some text is not replaced with translation
* Fix: some text are not translated
known issue:
1. sometime the original text show up
2. resume function not working
* Style: clean up code
2024-01-19 12:39:50 +08:00
yihong
9a20b17970
feat Gemini ( #366 )
...
* feat: gemini init
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
* fix: useless code
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
* feat: gemini model
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-06 22:21:53 +08:00
yihong
2ccc918337
feat: new openai package ( #358 )
...
* feat: new openai package
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
* fix: typo
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2023-12-26 17:55:26 +08:00
Vincent Young
ce67920eeb
feat: support for Custom API ( #354 )
...
feat: support for Custom API
2023-11-16 10:00:17 +08:00
Zhizhen He
b4817f2c9b
feat: add github action to check spelling ( #326 )
2023-08-22 19:36:53 +08:00
splintPRO
c2498286f0
Change links to deepl ( #328 )
2023-08-22 19:36:35 +08:00
YYLIZH
c7ee4acb14
Add formal doc page ( #319 )
...
* fix readme
* done
2023-08-15 09:41:13 +08:00
Linusp
20ad3ba7c1
feat: add temperature parameter ( #278 )
...
* add `temperature` parameter to OpenAI based translators and `Claude`
* add `temperature` parameter to book loaders
* add `--temperature` option to cli
2023-05-21 17:28:19 +08:00
astromaddie
cd56b1e0ab
feature: GPT-4 support ( #262 )
...
* feat: add gpt4 support
* Update prompt_template_sample.json
* fix: cleaned up formatting for quotes
* feature: added context functionality (--use_context) for GPT4 model, which accumulates a running paragraph giving historical context to the current passage
* fix: propagated context_flag argument to txt_loader and srt_loader
* Updated Readme to include GPT4 parameters
* Removed debug output
* fix: lint
---------
Co-authored-by: yihong <zouzou0208@gmail.com>
2023-05-11 21:57:32 +08:00
James Tsang
c55f816a43
feat: support claude model ( #267 )
2023-05-07 21:23:44 +08:00
hleft
a0c999a2e6
support single_translate in epub ( #237 )
...
* support no_bilingual
* use single_translate instead no_bilingual
2023-04-09 21:20:41 +08:00
yihong
1b64fe0315
fix: drop chatgpt account ( #234 )
2023-04-03 20:02:26 +08:00
hleft
fd5782513a
support exclude or only translate filelist, exclude taglist ( #216 )
...
* support exclude_filelist
support only_filelist
* support exclude tags
* clean
2023-04-02 17:09:52 +08:00
guaguaguaxia
91ef9fa788
feat: add ChatGPT Account translate method and input options to __init… ( #43 )
...
add ChatGPT Account translate method
---------
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2023-03-30 19:28:00 +08:00
Daniel Parizher
e7ab4c7c81
Cleanup ( #174 )
...
* Clean up some code
2023-03-30 19:22:36 +08:00
Bryan Lee
2e0720739b
feat: add Azure OpenAI service support ( #213 )
...
* feat: add Azure OpenAI service support
* fix: code format
* fix: enforce `api_base` when providing `deployment_id`
---------
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2023-03-30 19:17:27 +08:00
h
dfa1b9ada8
support --retranslate
...
use string for start,end
clean
autofind filename
fix bug, don't use index
clean
2023-03-22 22:58:21 +08:00
hleft
1d680a1ccf
support --translation_style ( #185 )
...
* support translation_style
* clean code
2023-03-19 21:20:30 +08:00
h
e0aef6f8af
Check whether the file exists, do not report a bunch of exceptions
2023-03-19 16:08:44 +08:00
yihong
529749e055
fix: code format ( #181 )
...
* fix: code format
* fix: lint
2023-03-17 22:41:12 +08:00
hleft
e38a236be6
Cumulative translation ( #148 )
2023-03-16 21:25:47 +08:00
yihong
0dd61e5b3e
feat: support deepl ( #162 )
2023-03-13 23:13:04 +08:00
Voyageyang
839c2ce6ad
( #93 ) feat: add caiyun translator ( #160 )
...
* feat: add caiyun translator
* format code and update README-CN.md
* fix: add caiyun_key args
* fix: add raise
---------
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2023-03-13 20:49:23 +08:00
Hsieh Chin Fan
0a1991d8ad
Fix library of crypto for current Windows ( #159 )
...
* Fix library of crypto for current Windows
* Modify obok import statement
Only import this module when necessary
---------
Co-authored-by: Hsieh Chin Fan <pham@topo.tw>
2023-03-13 18:59:52 +08:00
zstone12
5d2c89a841
feat: batch translate txt file ( #153 )
...
* feat: batch translate txt file
* feat: batch size customed
* reslove conflicts
2023-03-12 23:03:28 +08:00
yihong
f09c2717f1
feat: pypi ( #154 )
...
* feat: pypi
2023-03-12 23:00:54 +08:00
Conan
ae3e3ba558
Unify prompt config for user
and system
( #151 )
...
* fix list number in readmes
* fix list number in readmes
* unify prompt config for role user and system
* update json sample file
* update documents and add test
* update readmes
2023-03-12 14:48:24 +08:00
Conan
b1d62e8b30
added prompt template ( #145 )
...
* add prompt template
* format output for ChatGPTAPITranslator
* black format files
* fix: google txt loader failed
---------
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2023-03-11 21:51:29 +08:00
Hsieh Chin Fan
2384fb3fe2
Add options for books on kobo e-reader ( #138 )
...
Add obok.py as file selector for kobo device
---------
Co-authored-by: Hsieh Chin Fan <pham@topo.tw>
2023-03-11 21:06:49 +08:00
yihong
d95f0b3942
fix : #114 ( #139 )
2023-03-10 21:05:34 +08:00
yihong0618
1ef61a75c8
fix: key bug
2023-03-10 15:40:44 +08:00
InzamZ
cbe165df19
fix( #92 ): add a arguments to allow NavigableStrings translate ( #126 )
...
* fix(#92 ): add a arguments to allow NavigableStrings
---------
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2023-03-10 15:24:20 +08:00
lizhimiao
e6e4916ac4
feat: added google translate support ( #131 )
...
* added google translate support.
* format code using black.
2023-03-10 15:06:05 +08:00
hleft
b25c4ca873
support config tags to translate ( #107 )
2023-03-08 22:11:43 +08:00