INNER CODE UNIT · Python

initialize

mfmezger/conversational-agent-langchain · frontend/assistant.py:158

def initialize() -> None:
    """Initialize the GUI."""
    sidebar()
    init_chat_history()
    display_chat_history()

    # React to user input
    if prompt := st.chat_input("What is up?"):
        # Display user message in chat message container
        st.chat_message("user").markdown(prompt)
        # Add user message to chat history
        st.session_state.messages.append({"role": "user", "content": prompt})

        handle_rag_response(prompt)


if __name__ == "__main__":
    initialize()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…