davidfearne commited on
Commit
9361c0b
·
verified ·
1 Parent(s): 9ef50f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -168,6 +168,8 @@ llm1 = st.sidebar.selectbox("Model Selection", ['GPT-4', 'GPT3.5'], key='persona
168
  temp1 = st.sidebar.slider("Temperature", min_value=0.0, max_value=1.0, step=0.1, value=0.6, key='persona1_temp')
169
  tokens1 = st.sidebar.slider("Tokens", min_value=0, max_value=4000, step=100, value=500, key='persona1_tokens')
170
 
 
 
171
  st.sidebar.caption(f"Session ID: {genuuid()}")
172
 
173
  # Main chat interface
@@ -217,9 +219,10 @@ else:
217
  llm2="GPT3.5",
218
  tokens2=1000,
219
  temperature2=0.2
 
220
  )
221
 
222
- response, retrival = call_chat_api(data)
223
  agent_message = response.get("content", "No response received from the agent.")
224
  elapsed_time = response.get("elapsed_time", 0)
225
  st.session_state.messages.append({"role": "assistant", "content": agent_message})
 
168
  temp1 = st.sidebar.slider("Temperature", min_value=0.0, max_value=1.0, step=0.1, value=0.6, key='persona1_temp')
169
  tokens1 = st.sidebar.slider("Tokens", min_value=0, max_value=4000, step=100, value=500, key='persona1_tokens')
170
 
171
+ k = st.sidebar.slider("Returned Docs", min_value=1, max_value=10, step=1, value=3, key='k')
172
+
173
  st.sidebar.caption(f"Session ID: {genuuid()}")
174
 
175
  # Main chat interface
 
219
  llm2="GPT3.5",
220
  tokens2=1000,
221
  temperature2=0.2
222
+
223
  )
224
 
225
+ response, retrival = call_chat_api(data, k)
226
  agent_message = response.get("content", "No response received from the agent.")
227
  elapsed_time = response.get("elapsed_time", 0)
228
  st.session_state.messages.append({"role": "assistant", "content": agent_message})