fix system prompt, add python-dotenv to requirements

This commit is contained in:
wunderwuzzi23
2023-03-06 21:22:49 -08:00
parent b44925c6dd
commit 84f2431c44
2 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
openai==0.27 openai==0.27
termcolor==2.2.0 termcolor==2.2.0
colorama colorama
python-dotenv
+2 -3
View File
@@ -115,13 +115,12 @@ if __name__ == "__main__":
print ("No user prompt specified.") print ("No user prompt specified.")
sys.exit(-1) sys.exit(-1)
# Load the correct prompt based on Shell and OS and append the user's prompt # Load the correct prompt based on Shell and OS and append the user's prompt
prompt = get_full_prompt(user_prompt, shell) prompt = get_full_prompt(user_prompt, shell)
# Make the first line also the system prompt # Make the first line also the system prompt
system_prompt = prompt[1] system_prompt = prompt.split("\n")[0]
# Call the ChatGPT API # Call the ChatGPT API
response = openai.ChatCompletion.create( response = openai.ChatCompletion.create(
model="gpt-3.5-turbo", model="gpt-3.5-turbo",