Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618 2024-01-30 22:05:28 +08:00
parent 365d6628bf
commit 9c53374955
3 changed files with 2 additions and 4 deletions

View File

@ -404,7 +404,6 @@ So you are close to reaching the limit. You have to choose your own value, there
e.translate_model.set_deployment_id(options.deployment_id)
# TODO refactor, quick fix for gpt4 model
if options.model == "chatgptapi":
print(21232)
e.translate_model.set_gpt35_models()
if options.model == "gpt4":
e.translate_model.set_gpt4_models()

View File

@ -47,7 +47,7 @@ class ChatGPTAPI(Base):
) -> None:
super().__init__(key, language)
self.key_len = len(key.split(","))
self.openai_client = OpenAI(api_key=key, base_url=api_base)
self.openai_client = OpenAI(api_key=next(self.keys), base_url=api_base)
self.api_base = api_base
self.prompt_template = (
@ -72,7 +72,6 @@ class ChatGPTAPI(Base):
self.openai_client.api_key = next(self.keys)
def rotate_model(self):
# TODO
self.model = next(self.model_list)
def create_chat_completion(self, text):

View File

@ -19,7 +19,7 @@ packages = [
setup(
name="bbook_maker",
description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.",
version="0.7.3",
version="0.7.5",
license="MIT",
author="yihong0618",
author_email="zouzou0208@gmail.com",