INNER CODE UNIT · Python

handle_rag_response

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

def handle_rag_response(prompt: str) -> None:
    """Wrapper to run async handler."""
    asyncio.run(handle_rag_response_async(prompt))


def sidebar() -> None:
    """Create the sidebar for document ingestion."""
    with st.sidebar:
        st.header("Document Ingestion")
        collection_name = st.text_input("Collection Name", value="default")
        file_ending = st.selectbox("Document Type", options=[".pdf", ".txt"])

        uploaded_files = st.file_uploader("Choose files", type=["pdf"] if file_ending == ".pdf" else ["txt"], accept_multiple_files=True)

        if st.button("Upload & Embed"):
            if uploaded_files:
                with st.spinner("Uploading and embedding documents..."):
                    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…