updated the flag --confirm as required

- Updated the flag --confirm=True which will allow user to say yes or no before making changes to the file.
- If flag is not used then it will right away make changes to the file.
- Updated the readme with an example.
pull/16/head
Prayag Shah 2023-04-15 02:28:13 -03:00
rodzic 946e15ff20
commit fdbaaa3e84
2 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -29,14 +29,14 @@ You can also run with other models, but be warned they may not adhere to the edi
python wolverine.py --model=gpt-3.5-turbo buggy_script.py "subtract" 20 3
You can also use flag `--confirm=True` which will ask you `yes or no` before making changes to the file. If flag is not used then it will apply the changes to the file
python wolverine.py buggy_script.py "subtract" 20 3 --confirm=True
If you want to use GPT-3.5 by default instead of GPT-4 uncomment the default model line in `.env`:
DEFAULT_MODEL=gpt-3.5-turbo
You can also use flag `--confirm=True` which will ask you `yes or no` before making changes to the file. If flag is not used then it will apply the changes to the file
python wolverine.py buggy_script.py "subtract" 20 3 --confirm=True
## Future Plans
This is just a quick prototype I threw together in a few hours. There are many possible extensions and contributions are welcome:

Wyświetl plik

@ -108,6 +108,8 @@ def send_error_to_gpt(file_path, args, error_message, model=DEFAULT_MODEL):
return json_validated_response(model, messages)
# Added the flag -confirm which will ask user before writing changes to file
def apply_changes(file_path, changes: list, confirm=False):
"""