From c2498286f05f92cf7554816976945748b93a7a52 Mon Sep 17 00:00:00 2001 From: splintPRO Date: Tue, 22 Aug 2023 14:36:35 +0300 Subject: [PATCH] Change links to deepl (#328) --- README-CN.md | 2 +- README.md | 2 +- book_maker/cli.py | 2 +- book_maker/translator/deepl_translator.py | 2 +- docs/model_lang.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README-CN.md b/README-CN.md index f5790c4..b34d45d 100644 --- a/README-CN.md +++ b/README-CN.md @@ -20,7 +20,7 @@ bilingual_book_maker 是一个 AI 翻译工具,使用 ChatGPT 帮助用户制 或者,指定环境变量 `BBM_OPENAI_API_KEY` 来略过这个选项。 - 本地放了一个 `test_books/animal_farm.epub` 给大家测试 - 默认用了 [GPT-3.5-turbo](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) 模型,也就是 ChatGPT 正在使用的模型,用 `--model gpt3` 来使用 gpt3 模型 -- 可以使用 DeepL 封装的 api 进行翻译,需要付费,[DeepL Translator](https://rapidapi.com/splintPRO/api/deepl-translator) 来获得 token `--model deepl --deepl_key ${deepl_key}` +- 可以使用 DeepL 封装的 api 进行翻译,需要付费,[DeepL Translator](https://rapidapi.com/splintPRO/api/dpl-translator) 来获得 token `--model deepl --deepl_key ${deepl_key}` - 可以使用 DeepL free `--model deeplfree` - 可以使用 [Claude](https://console.anthropic.com/docs) 模型进行翻译 `--model claude --claude_key ${claude_key}` - 可以使用 google 来翻译 `--model google` diff --git a/README.md b/README.md index 64db5a7..bd21daa 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Find more info here for using liteLLM: https://github.com/BerriAI/litellm/blob/m - A sample book, `test_books/animal_farm.epub`, is provided for testing purposes. - The default underlying model is [GPT-3.5-turbo](https://openai.com/blog/introducing-chatgpt-and-whisper-apis), which is used by ChatGPT currently. Use `--model gpt4` to change the underlying model to `GPT4` and use `--model gpt3` to change the model to `GPT3`. If using `GPT4`, you can add `--use_context` to add a context paragraph to each passage sent to the model for translation (see below) -- support DeepL model [DeepL Translator](https://rapidapi.com/splintPRO/api/deepl-translator) need pay to get the token use `--model deepl --deepl_key ${deepl_key}` +- support DeepL model [DeepL Translator](https://rapidapi.com/splintPRO/api/dpl-translator) need pay to get the token use `--model deepl --deepl_key ${deepl_key}` - support DeepL free model `--model deeplfree` - Support [Claude](https://console.anthropic.com/docs) model, use `--model claude --claude_key ${claude_key}` - Use `--test` option to preview the result if you haven't paid for the service. Note that there is a limit and it may take some time. diff --git a/book_maker/cli.py b/book_maker/cli.py index d77892f..991e540 100644 --- a/book_maker/cli.py +++ b/book_maker/cli.py @@ -90,7 +90,7 @@ def main(): "--deepl_key", dest="deepl_key", type=str, - help="you can apply deepl key from here (https://rapidapi.com/splintPRO/api/deepl-translator", + help="you can apply deepl key from here (https://rapidapi.com/splintPRO/api/dpl-translator", ) parser.add_argument( "--claude_key", diff --git a/book_maker/translator/deepl_translator.py b/book_maker/translator/deepl_translator.py index b892672..e0c5fa5 100644 --- a/book_maker/translator/deepl_translator.py +++ b/book_maker/translator/deepl_translator.py @@ -17,7 +17,7 @@ class DeepL(Base): def __init__(self, key, language, **kwargs) -> None: super().__init__(key, language) - self.api_url = "https://deepl-translator.p.rapidapi.com/translate" + self.api_url = "https://dpl-translator.p.rapidapi.com/translate" self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", diff --git a/docs/model_lang.md b/docs/model_lang.md index 723918b..f3b844e 100644 --- a/docs/model_lang.md +++ b/docs/model_lang.md @@ -71,7 +71,7 @@ There are two models you can choose from. -* deepl: [DeepL Translator](https://rapidapi.com/splintPRO/api/deepl-translator).
+* deepl: [DeepL Translator](https://rapidapi.com/splintPRO/api/dpl-translator).