Merge pull request #8 from epylar/select-model

Allow the user to select a model
pull/17/head
biobootloader 2023-04-08 12:53:32 -07:00 zatwierdzone przez GitHub
commit 56bb66e3ec
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 7 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ def run_script(script_name, script_args):
return result.decode("utf-8"), 0
def send_error_to_gpt4(file_path, args, error_message, model):
def send_error_to_gpt(file_path, args, error_message, model):
with open(file_path, "r") as f:
file_lines = f.readlines()
@ -115,11 +115,6 @@ def apply_changes(file_path, changes_json):
def main(script_name, *script_args, revert=False, model="gpt-4"):
# if len(sys.argv) < 3:
# print("Usage: python wolverine.py <script_name> <arg1> <arg2> ... [--revert]")
# sys.exit(1)
# Revert changes if requested
if revert:
backup_file = script_name + ".bak"
if os.path.exists(backup_file):
@ -144,7 +139,7 @@ def main(script_name, *script_args, revert=False, model="gpt-4"):
cprint("Script crashed. Trying to fix...", "blue")
print("Output:", output)
json_response = send_error_to_gpt4(
json_response = send_error_to_gpt(
file_path=script_name,
args=script_args,
error_message=output,