mbosse99 commited on
Commit
c25263f
·
verified ·
1 Parent(s): ed022b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -235,17 +235,15 @@ def bot(history, job, resume, job_params):
235
  engine="gpt-4-1106",
236
  messages=messages,
237
  temperature=0.0,
238
- stream=True,
239
  )
240
-
241
- print(response)
242
 
243
- history[-1][1] = ""
244
- for chunk in response:
245
- print(chunk)
246
- if len(chunk["choices"][0]["delta"]) != 0 and hasattr(chunk["choices"][0]["delta"], "content"):
247
- history[-1][1] = history[-1][1] + chunk["choices"][0]["delta"]["content"]
248
- yield history
249
  if history[-1][1] == "Thank you for conducting the evaluation! We will get back to you shortly.":
250
  print("finished")
251
  send_evaluation(history, job, resume, job_params)
 
235
  engine="gpt-4-1106",
236
  messages=messages,
237
  temperature=0.0,
238
+ #stream=True,
239
  )
 
 
240
 
241
+ history[-1][1] = response["choices"][0]["message"]["content"]
242
+ #for chunk in response:
243
+ # print(chunk)
244
+ # if len(chunk["choices"][0]["delta"]) != 0 and hasattr(chunk["choices"][0]["delta"], "content"):
245
+ # history[-1][1] = history[-1][1] + chunk["choices"][0]["delta"]["content"]
246
+ # yield history
247
  if history[-1][1] == "Thank you for conducting the evaluation! We will get back to you shortly.":
248
  print("finished")
249
  send_evaluation(history, job, resume, job_params)