cogcorp commited on
Commit
13c2cf2
·
1 Parent(s): 511c006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -104,14 +104,14 @@ def load_recommender(paths, start_page=1):
104
  return 'Corpus Loaded.'
105
 
106
  def generate_text(messages, engine='gpt-3.5-turbo', max_tokens=2048, temperature=0.8):
107
- response = openai.ChatCompletion.create(
108
  model=engine,
109
  messages=[{"role": "system", "content": "You are a research assistant"},
110
  {"role": "user", "content": prompt}],
111
  max_tokens=max_tokens,
112
  n=1,
113
  temperature=temperature
114
- )
115
  return response.choices[0].message['content']
116
 
117
 
 
104
  return 'Corpus Loaded.'
105
 
106
  def generate_text(messages, engine='gpt-3.5-turbo', max_tokens=2048, temperature=0.8):
107
+ response = openai.ChatCompletion.create(
108
  model=engine,
109
  messages=[{"role": "system", "content": "You are a research assistant"},
110
  {"role": "user", "content": prompt}],
111
  max_tokens=max_tokens,
112
  n=1,
113
  temperature=temperature
114
+ )
115
  return response.choices[0].message['content']
116
 
117