Spaces:
Build error
Build error
Update app.py
Browse files31 unmodified lines32333435363738394031 unmodified lines# Generate bot responsebot_response = generate_bot_response(user_input)# Ensure the history is in the correct format: a list of tupleshistory.append(("user", user_input)) # Append user messagehistory.append(("bot", bot_response)) # Append bot response# Return the updated history and the bot response for displayreturn history, history31 unmodified lines32333435363738394031 unmodified lines# Generate bot responsebot_response = generate_bot_response(user_input)# Ensure the history is in the correct format: a list of dictionaries with 'role' and 'content' keyshistory.append({"role": "user", "content": user_input}) # Append user messagehistory.append({"role": "assistant", "content": bot_response}) # Append bot response# Return the updated history and the bot response for displayreturn history, history
app.py+3-3