File size: 1,116 Bytes
e5b3236
 
 
 
 
 
 
79c5dd7
e5b3236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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","Google"],
            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("---")