Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -247,6 +247,15 @@ def handle_example_click(prompt_text):
|
|
247 |
'gemini_history': [],
|
248 |
'chat_title': get_chat_title([])
|
249 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
process_model_response(prompt_text)
|
251 |
|
252 |
# Modificar la secci贸n principal de manejo de chat
|
|
|
247 |
'gemini_history': [],
|
248 |
'chat_title': get_chat_title([])
|
249 |
})
|
250 |
+
|
251 |
+
# A帽adir esta verificaci贸n cr铆tica
|
252 |
+
if st.session_state.current_chat_id not in st.session_state.chats_in_memory:
|
253 |
+
st.session_state.chats_in_memory[st.session_state.current_chat_id] = {
|
254 |
+
'messages': [],
|
255 |
+
'gemini_history': [],
|
256 |
+
'title': 'Nuevo Chat'
|
257 |
+
}
|
258 |
+
|
259 |
process_model_response(prompt_text)
|
260 |
|
261 |
# Modificar la secci贸n principal de manejo de chat
|