Skip to content

Commit d5a3eee

Browse files
committed
chaneg default chatgpt model
1 parent 4c355d8 commit d5a3eee

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

manga_translator/mode/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def translate_path(self, path: str, dest: str = None, params: dict[str, Un
9595

9696
if config_file_path:
9797
try:
98-
with open(config_file_path, 'r') as file:
98+
with open(config_file_path, 'r', encoding='utf-8') as file:
9999
config_content = file.read()
100100
except Exception as e:
101101
print("Couldnt read file")

manga_translator/translators/chatgpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ async def _request_translation(self, to_lang: str, prompt: str) -> str:
720720
response = await self.client.chat.completions.create(
721721
model=OPENAI_MODEL,
722722
messages=messages,
723-
max_tokens=self._MAX_TOKENS // 2,
723+
max_completion_tokens=self._MAX_TOKENS // 2,
724724
temperature=self.temperature,
725725
top_p=self.top_p,
726726
timeout=self._TIMEOUT

manga_translator/translators/keys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
DEEPL_AUTH_KEY = os.getenv('DEEPL_AUTH_KEY', '') #YOUR_AUTH_KEY
1313
# openai
1414
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY', '')
15-
OPENAI_MODEL = os.getenv('OPENAI_MODEL', 'chatgpt-4o-latest')
15+
OPENAI_MODEL = os.getenv('OPENAI_MODEL', 'gpt-5.4-mini')
1616

1717
GROQ_API_KEY = os.getenv('GROQ_API_KEY', '')
1818
GROQ_MODEL = os.getenv('GROQ_MODEL', 'mixtral-8x7b-32768')

0 commit comments

Comments
 (0)