55 Commits

Author SHA1 Message Date
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
yihong0618
70d2535f84 fix: #391
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-04-04 21:36:36 +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
umm
95bdd1bf6b
feat: support Tencent TranSmart (#382) 2024-02-14 19:39:59 +08:00
yihong0618
3b731efc21 fix: #380 thanks yangchen859
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-31 10:18:06 +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
yihong0618
cb3779f279 fix: 374
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-27 22:17:23 +08:00
yihong0618
5a8cbf496f fix: #372
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-21 22:59:44 +08:00
t-boeck
79796456c3
remove gpt-4-0314 from model list (#371)
* remove gpt-4-0314 from model list

* fix: better model_list

Signed-off-by: yihong0618 <zouzou0208@gmail.com>

---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2024-01-21 22:02:00 +08:00
鄭棋文Steven ,Chi-Wen Cheng
ecf86a2747
Fixed Azure openai bug (#368)
fix(chatgptapi_translator): when use azure openai something wrong

1. when I use azure openai will get "api_base" not  have this arribute error. So I add         self.api_base = api_base
2. In line 84 when the message content type is None will get typeError. So I add a if else to avoid this error.

* style: format code style

* style: format code style

* fix: lint
2024-01-10 14:26: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
yihong0618
7e0f4fce54 fix: #211
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2024-01-03 22:20:09 +08:00
Niko
98e3dd680c
fix #357 (#362) 2024-01-02 14:56:44 +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
yihong0618
d85be65266 fix: #353
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2023-11-26 22:24:58 +08:00
Vincent Young
ce67920eeb
feat: support for Custom API (#354)
feat: support for Custom API
2023-11-16 10:00:17 +08:00
yihong0618
999c9c8bdb feat: change default to 16k, delete useless file 2023-08-29 14:18:02 +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
Ishaan Jaff
d8ad734888
Add support for Llama2, Palm, Cohere, Replicate Models - using litellm (#317)
update readme
2023-08-15 09:37:08 +08:00
yihong0618
02c2f13737 fix: #286 2023-05-28 20:22:43 +08:00
yihong0618
d0350e0fd0 This commit change split("\n") to splitlines()
fix: #269 and help by @WeeAris

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2023-05-25 21:22:36 +08:00
yihong0618
a599ba7eee fix: #279 2023-05-24 11:13:06 +08:00
yihong
1a0bd42259
fix: #280,#279 (#281)
* fix: #280,#279
2023-05-23 20:05:17 +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
Liao Weiheng
9ba0dd4b91
Improved the issue of Google Translate skipping paragraphs due to connectivity problems. (#275) 2023-05-21 09:19:48 +08:00
yihong
70e8c1e40d
feat: support deepl free (#274)
* feat: support deepl free

* fix
2023-05-14 22:48:11 +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
yihong
237ce5280a
fix: #239 #238 (#240) 2023-04-08 17:45:14 +08:00
yihong
1b64fe0315
fix: drop chatgpt account (#234) 2023-04-03 20:02:26 +08:00
yihong
8cf4124986
feat: all print green (#228) 2023-04-02 22:00:01 +08:00
Will 保哥
cc64495d90
Add some color on the translated text output (#226) 2023-04-02 21:05:10 +08:00
Will 保哥
cc9e816c57
替 BBM_CHATGPTAPI_SYS_MSG 與 BBM_CHATGPTAPI_USER_MSG_TEMPLATE 加入斷行能力 (#224) 2023-04-02 17:09:22 +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
99bcaddff6 improve mult line in --accumulated_num 2023-03-18 15:09:16 +08:00
yihong
529749e055
fix: code format (#181)
* fix: code format

* fix: lint
2023-03-17 22:41:12 +08:00
h
413810e2bf fix: Modify log location and regular expressions 2023-03-17 03:41:45 +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
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
hleft
1c3fe7e55d
fix (#149) 2023-03-11 22:40:58 +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
hleft
c0b3e0c2d5
support system meesage in environment variable (#144)
* support config tags to translate

* support system meesage in envirment
2023-03-11 20:31:16 +08:00
yihong0618
cf44a19d82 fix: print message before sleep 2023-03-10 20:54:07 +08:00