import streamlit as st def retrieval_settings(session_state, config): st.markdown("# Web Retrieval") session_state.rag_enabled = st.toggle("Activate Web Retrieval", value=True) session_state.search_vendor = st.radio( "Select Search Vendor", ["Bing"], disabled=not session_state.rag_enabled, ) session_state.n_crawl = st.slider( label="Links to Crawl", key=1, min_value=1, max_value=10, value=4, disabled=not session_state.rag_enabled, ) session_state.top_k = st.slider( label="Chunks to Retrieve via Reranker", key=2, min_value=1, max_value=20, value=5, disabled=not session_state.rag_enabled, ) session_state.chunk_size = st.slider( label="Chunk Size", value=512, min_value=128, max_value=1024, step=8, disabled=not session_state.rag_enabled, ) st.markdown("---")