|
14 | 14 |
|
15 | 15 | MASTER_BRANCH = "master" |
16 | 16 | VERBOSE = True |
17 | | -MAX_TOKENS = 30000 #gpt-4-1106-preview |
| 17 | +MAX_TOKENS = 50000 #gpt-4-1106-preview |
18 | 18 | DISALLOWED_SPECIAL = "<|endoftext|>" |
19 | 19 | REPLACEMENT_TOKEN = "<END_OF_TEXT>" |
20 | 20 |
|
@@ -156,7 +156,7 @@ def translate_text(language, text, file_path, model, cont=0, slpitted=False, cli |
156 | 156 | response = client.chat.completions.create( |
157 | 157 | model=model, |
158 | 158 | messages=messages, |
159 | | - temperature=0 |
| 159 | + temperature=1 # 1 because gpt-5 doesn't support other |
160 | 160 | ) |
161 | 161 | except Exception as e: |
162 | 162 | print("Python Exception: " + str(e)) |
@@ -371,7 +371,7 @@ def translate_directory(language, source_path, dest_path, model, num_threads, cl |
371 | 371 | parser.add_argument('-l', '--language', required=True, help='Target language for translation.') |
372 | 372 | parser.add_argument('-b', '--branch', required=True, help='Branch name to copy translated files.') |
373 | 373 | parser.add_argument('-k', '--api-key', required=True, help='API key to use.') |
374 | | - parser.add_argument('-m', '--model', default="gpt-4o-mini", help='The openai model to use. By default: gpt-4o-mini') |
| 374 | + parser.add_argument('-m', '--model', default="gpt-5-mini", help='The openai model to use. By default: gpt-5-mini') |
375 | 375 | parser.add_argument('-o', '--org-id', help='The org ID to use (if not set the default one will be used).') |
376 | 376 | parser.add_argument('-f', '--file-paths', help='If this is set, only the indicated files will be translated (" , " separated).') |
377 | 377 | parser.add_argument('-n', '--dont-cd', action='store_false', help="If this is true, the script won't change the current directory.") |
|
0 commit comments