PhilSpiel commited on
Commit
39be5fa
·
1 Parent(s): 4a70bff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,15 +7,15 @@ openai.api_key = os.getenv("OPENAPI_KEY") # Replace with your key
7
 
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(
16
  model='gpt-3.5-turbo',
17
  messages= history_openai_format,
18
- temperature=1.0,
19
  stream=True
20
  )
21
 
 
7
 
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(
16
  model='gpt-3.5-turbo',
17
  messages= history_openai_format,
18
+ temperature=0.5,
19
  stream=True
20
  )
21