Skip to content

Commit 040fc40

Browse files
committed
Merge branch 'master' of github.com:HackTricks-wiki/hacktricks-cloud
2 parents a08b69f + 7155e78 commit 040fc40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/translator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
MASTER_BRANCH = "master"
1616
VERBOSE = True
17-
MAX_TOKENS = 30000 #gpt-4-1106-preview
17+
MAX_TOKENS = 50000 #gpt-4-1106-preview
1818
DISALLOWED_SPECIAL = "<|endoftext|>"
1919
REPLACEMENT_TOKEN = "<END_OF_TEXT>"
2020

@@ -156,7 +156,7 @@ def translate_text(language, text, file_path, model, cont=0, slpitted=False, cli
156156
response = client.chat.completions.create(
157157
model=model,
158158
messages=messages,
159-
temperature=0
159+
temperature=1 # 1 because gpt-5 doesn't support other
160160
)
161161
except Exception as e:
162162
print("Python Exception: " + str(e))
@@ -371,7 +371,7 @@ def translate_directory(language, source_path, dest_path, model, num_threads, cl
371371
parser.add_argument('-l', '--language', required=True, help='Target language for translation.')
372372
parser.add_argument('-b', '--branch', required=True, help='Branch name to copy translated files.')
373373
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')
375375
parser.add_argument('-o', '--org-id', help='The org ID to use (if not set the default one will be used).')
376376
parser.add_argument('-f', '--file-paths', help='If this is set, only the indicated files will be translated (" , " separated).')
377377
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

Comments
 (0)