ostarling commited on
Commit
031f144
·
verified ·
1 Parent(s): f920af2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -31,9 +31,8 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
31
  temperature=temperature,
32
  top_p=top_p,
33
  ):
34
- token = chunk.choices[0].delta.content
35
- if token:
36
- response += token
37
  yield response
38
 
39
 
 
31
  temperature=temperature,
32
  top_p=top_p,
33
  ):
34
+ if chunk.choices and chunk.choices[0].delta.content:
35
+ response += chunk.choices[0].delta.content
 
36
  yield response
37
 
38