kopia lustrzana https://github.com/biobootloader/wolverine
cleanup
rodzic
b044882dc3
commit
e1d0a790f8
|
@ -1,2 +1,2 @@
|
||||||
OPENAI_API_KEY=your_api_key
|
OPENAI_API_KEY=your_api_key
|
||||||
DEFAULT_MODEL=gpt-3.5-turbo
|
#DEFAULT_MODEL=gpt-3.5-turbo
|
||||||
|
|
|
@ -15,9 +15,9 @@ For a quick demonstration see my [demo video on twitter](https://twitter.com/bio
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
cp .env.sample .env
|
cp .env.sample .env
|
||||||
|
|
||||||
Add your openAI api key to `.env` - _warning!_ by default this uses GPT-4 and may make many repeated calls to the api.
|
Add your openAI api key to `.env`
|
||||||
|
|
||||||
OPENAI_API_KEY=sk-abcdefghijklmopqrstuvwxyz
|
_warning!_ by default this uses GPT-4 and may make many repeated calls to the api.
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ 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
|
python wolverine.py --model=gpt-3.5-turbo buggy_script.py "subtract" 20 3
|
||||||
|
|
||||||
If you want to use GPT-3.5 by default instead of GPT-4 add this to `.env`:
|
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
|
DEFAULT_MODEL=gpt-3.5-turbo
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
import difflib
|
import difflib
|
||||||
|
import fire
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import openai
|
||||||
|
|
||||||
import fire
|
|
||||||
from dotenv import load_dotenv
|
|
||||||
from termcolor import cprint
|
from termcolor import cprint
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||||
import openai
|
|
||||||
|
|
||||||
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
|
||||||
|
|
||||||
DEFAULT_MODEL = os.environ.get("DEFAULT_MODEL", "gpt-4")
|
DEFAULT_MODEL = os.environ.get("DEFAULT_MODEL", "gpt-4")
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue