PhilSpiel commited on
Commit
2a3f016
·
1 Parent(s): 39e973a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,8 +8,8 @@ openai.api_key = os.getenv("OPENAPI_KEY") # Replace with your key
8
  def predict(message, history):
9
  history_openai_format = []
10
  for human, system in history:
11
- history_openai_format.append({"role": "system", "content":os.getenv("PROMPT")})
12
  history_openai_format.append({"role": "user", "content": human })
 
13
  history_openai_format.append({"role": "user", "content": message})
14
 
15
  response = openai.ChatCompletion.create(
 
8
  def predict(message, history):
9
  history_openai_format = []
10
  for human, system in history:
 
11
  history_openai_format.append({"role": "user", "content": human })
12
+ history_openai_format.append({"role": "system", "content":os.getenv("PROMPT")})
13
  history_openai_format.append({"role": "user", "content": message})
14
 
15
  response = openai.ChatCompletion.create(