J-LAB commited on
Commit
bd82aa9
1 Parent(s): 80b1f1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,9 +101,9 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
101
  if chunk.choices[0].delta.content is not None:
102
  token = chunk.choices[0].delta.content
103
  response += token
104
- yield response
105
  except Exception as e:
106
- yield f"An error occurred: {str(e)}"
107
 
108
  # Atualizando o histórico, mas sem mostrar image_result no chat
109
  history.append((message, response))
 
101
  if chunk.choices[0].delta.content is not None:
102
  token = chunk.choices[0].delta.content
103
  response += token
104
+
105
  except Exception as e:
106
+ return f"An error occurred: {str(e)}"
107
 
108
  # Atualizando o histórico, mas sem mostrar image_result no chat
109
  history.append((message, response))