TheBobBob commited on
Commit
65acdcc
·
verified ·
1 Parent(s): 1fe6df1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -208,7 +208,9 @@ def generate_response(db, query_text, previous_context):
208
  response_placeholder = st.empty()
209
 
210
  for token in output_stream:
211
- full_response += token
 
 
212
  response_placeholder.text(full_response)
213
 
214
  return full_response
 
208
  response_placeholder = st.empty()
209
 
210
  for token in output_stream:
211
+ # Extract the text from the token
212
+ token_text = token.get("choices", [{}])[0].get("text", "")
213
+ full_response += token_text
214
  response_placeholder.text(full_response)
215
 
216
  return full_response