neuralleap commited on
Commit
f9f382c
·
verified ·
1 Parent(s): 897bc55

Update app.py side bar

Browse files
Files changed (1) hide show
  1. app.py +22 -7
app.py CHANGED
@@ -170,15 +170,10 @@ def create_new_chat():
170
  "messages": []
171
  }
172
 
 
173
  # Sidebar for model selection and conversation management
174
  with st.sidebar:
175
- st.title("Conversations")
176
- if st.button("+ New Chat"):
177
- create_new_chat()
178
- st.rerun()
179
-
180
- st.markdown("---")
181
- st.subheader("Model Selection")
182
  selected_model = st.selectbox(
183
  "Choose a model:",
184
  list(AVAILABLE_MODELS.keys()),
@@ -186,8 +181,28 @@ with st.sidebar:
186
  )
187
  st.session_state.selected_model = selected_model
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  st.markdown("---")
190
 
 
191
  # Main chat window
192
  with st.container():
193
  current_id = st.session_state.current_conversation_id
 
170
  "messages": []
171
  }
172
 
173
+ # Sidebar for model selection and conversation management
174
  # Sidebar for model selection and conversation management
175
  with st.sidebar:
176
+ st.title("Model Selection")
 
 
 
 
 
 
177
  selected_model = st.selectbox(
178
  "Choose a model:",
179
  list(AVAILABLE_MODELS.keys()),
 
181
  )
182
  st.session_state.selected_model = selected_model
183
 
184
+ # Display selected model's information
185
+ model_info = AVAILABLE_MODELS[selected_model]
186
+ st.markdown("### Selected Model Info")
187
+ st.markdown(f"**Model:** `{selected_model}`")
188
+ st.markdown(f"**Description:** {model_info['description']}")
189
+ st.markdown(f"**Max Tokens:** {model_info['max_tokens']}")
190
+
191
+ # Display temperature only if the model supports it
192
+ models_without_temperature = [
193
+ "o3-mini",
194
+ "o1",
195
+ "gpt-4o",
196
+ "o3-mini-2025-01-31"
197
+ ]
198
+ if not any(selected_model.startswith(prefix) for prefix in models_without_temperature):
199
+ st.markdown(f"**Temperature:** {model_info['temperature']}")
200
+ else:
201
+ st.markdown("**Temperature:** Not supported for this model")
202
+
203
  st.markdown("---")
204
 
205
+
206
  # Main chat window
207
  with st.container():
208
  current_id = st.session_state.current_conversation_id