mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
Change links to deepl (#328)
This commit is contained in:
parent
c7ee4acb14
commit
c2498286f0
@ -20,7 +20,7 @@ bilingual_book_maker 是一个 AI 翻译工具,使用 ChatGPT 帮助用户制
|
|||||||
或者,指定环境变量 `BBM_OPENAI_API_KEY` 来略过这个选项。
|
或者,指定环境变量 `BBM_OPENAI_API_KEY` 来略过这个选项。
|
||||||
- 本地放了一个 `test_books/animal_farm.epub` 给大家测试
|
- 本地放了一个 `test_books/animal_farm.epub` 给大家测试
|
||||||
- 默认用了 [GPT-3.5-turbo](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) 模型,也就是 ChatGPT 正在使用的模型,用 `--model gpt3` 来使用 gpt3 模型
|
- 默认用了 [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`
|
- 可以使用 DeepL free `--model deeplfree`
|
||||||
- 可以使用 [Claude](https://console.anthropic.com/docs) 模型进行翻译 `--model claude --claude_key ${claude_key}`
|
- 可以使用 [Claude](https://console.anthropic.com/docs) 模型进行翻译 `--model claude --claude_key ${claude_key}`
|
||||||
- 可以使用 google 来翻译 `--model google`
|
- 可以使用 google 来翻译 `--model google`
|
||||||
|
@ -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.
|
- 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`.
|
- 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)
|
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 DeepL free model `--model deeplfree`
|
||||||
- Support [Claude](https://console.anthropic.com/docs) model, use `--model claude --claude_key ${claude_key}`
|
- 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.
|
- 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.
|
||||||
|
@ -90,7 +90,7 @@ def main():
|
|||||||
"--deepl_key",
|
"--deepl_key",
|
||||||
dest="deepl_key",
|
dest="deepl_key",
|
||||||
type=str,
|
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(
|
parser.add_argument(
|
||||||
"--claude_key",
|
"--claude_key",
|
||||||
|
@ -17,7 +17,7 @@ class DeepL(Base):
|
|||||||
|
|
||||||
def __init__(self, key, language, **kwargs) -> None:
|
def __init__(self, key, language, **kwargs) -> None:
|
||||||
super().__init__(key, language)
|
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 = {
|
self.headers = {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
"X-RapidAPI-Key": "",
|
"X-RapidAPI-Key": "",
|
||||||
|
@ -71,7 +71,7 @@ There are two models you can choose from.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
* deepl: [DeepL Translator](https://rapidapi.com/splintPRO/api/deepl-translator). <br>
|
* deepl: [DeepL Translator](https://rapidapi.com/splintPRO/api/dpl-translator). <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user