INNER CODE UNIT · Python

display_chat_history

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

def display_chat_history() -> None:
    """Display chat messages from history."""
    for message in st.session_state.messages:
        with st.chat_message(message["role"]):
            st.markdown(message["content"])


def display_sources(documents: list[dict]) -> None:
    """Display the sources."""
    if documents:
        with st.expander("Sources"):
            for doc in documents:
                st.markdown(f"**Page {doc.get('page', 'Unknown')}**")
                st.markdown(doc.get("text", ""))
                st.markdown("---")


async def process_rag_stream(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…