import streamlit as st import sys import os # Configuração do caminho para incluir as pastas necessárias sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Importando módulos necessários from interface.chatbot import Chatbot def main(): app = Chatbot() with st.sidebar: app.create_sidebar() app.mount_chatbot() if app.response: app.add_to_history(app.response, role="user") app.send_message_for_ai(app.response) app.response = "" # Zerando a variável após uso for message in st.session_state.chat_history: st.chat_message(message["role"]).write(message["content"]) if __name__ == "__main__": main()