Closed Chiru137 closed 4 days ago
st.session_state.session_index_tracker should be '2024-03-26 11:28:16.json', so there is the '.json' missing.
def save_chat_history():
if st.session_state.history != []:
if st.session_state.session_key == "new_session":
st.session_state.new_session_key = get_timestamp() + ".json"
save_chat_history_json(st.session_state.history, config["chat_history_path"] + st.session_state.new_session_key)
else:
save_chat_history_json(st.session_state.history, config["chat_history_path"] + st.session_state.session_key)
Maybe this line, hard to say without more information: st.session_state.new_session_key = get_timestamp() + ".json"
The main branch in this repository is further developed, but this branch is on a similar state like the youtube video, you could compare with the code there: https://github.com/Leon-Sander/local_multimodal_ai_chat/blob/YTVideoCodeVersion/
ValueError: '2024-03-26 11:28:16' is not in list Traceback: File "C:\Users\Chirag\OneDrive\Desktop\chatbot2\venv\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script exec(code, module.dict) File "C:\Users\Chirag\OneDrive\Desktop\chatbot2\local_multimodal_ai_chat\app.py", line 149, in
main()
File "C:\Users\Chirag\OneDrive\Desktop\chatbot2\local_multimodal_ai_chat\app.py", line 70, in main
index = chat_sessions.index(st.session_state.session_index_tracker)