kopia lustrzana https://github.com/biobootloader/wolverine
let model in default
rodzic
6bc85a41e2
commit
23e53dbb87
|
@ -113,17 +113,13 @@ def apply_changes(file_path, changes_json):
|
||||||
print(line, end="")
|
print(line, end="")
|
||||||
|
|
||||||
def avaibility(openaiObj):
|
def avaibility(openaiObj):
|
||||||
models_available = [x['id'] for x in openai.Model.list()['data']]
|
if "gpt-4" not in [x['id'] for x in openai.Model.list()['data']]:
|
||||||
if "gpt-4" not in models_available:
|
|
||||||
model = "gpt-3.5-turbo"
|
model = "gpt-3.5-turbo"
|
||||||
else:
|
else:
|
||||||
model = "gpt-4"
|
model = "gpt-4"
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
def main(script_name, *script_args, revert=False, model=avaibility(openai)):
|
||||||
|
|
||||||
def main(script_name, *script_args, revert=False):
|
|
||||||
model = avaibility(openai)
|
|
||||||
if revert:
|
if revert:
|
||||||
backup_file = script_name + ".bak"
|
backup_file = script_name + ".bak"
|
||||||
if os.path.exists(backup_file):
|
if os.path.exists(backup_file):
|
||||||
|
|
Ładowanie…
Reference in New Issue