Koomemartin commited on
Commit
a1b8b48
·
verified ·
1 Parent(s): da0656f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -131,7 +131,7 @@ if user_query:
131
  response = ""
132
  try:
133
  for chunk in chat_streaming:
134
- content = chunk.get('choices', [{}])[0].get('delta', {}).get('content', None)
135
  if content: # Ensure content is not None
136
  response += content
137
  st.write("🤖:")
 
131
  response = ""
132
  try:
133
  for chunk in chat_streaming:
134
+ content = chunk.choices[0].delta.content
135
  if content: # Ensure content is not None
136
  response += content
137
  st.write("🤖:")