Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions streamly.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ def on_chat_submit(chat_input, latest_updates):
Returns:
- None: Updates the chat history in Streamlit's session state.
"""
user_input = chat_input.strip().lower()
user_input = chat_input.strip()
normalized_input = user_input.lower()


if 'conversation_history' not in st.session_state:
st.session_state.conversation_history = initialize_conversation()
Expand All @@ -210,7 +212,7 @@ def on_chat_submit(chat_input, latest_updates):
model_engine = "gpt-4o-mini"
assistant_reply = ""

if "latest updates" in user_input:
if "latest updates" in normalized_input:
assistant_reply = "Here are the latest highlights from Streamlit:\n"
highlights = latest_updates.get("Highlights", {})
if highlights:
Expand Down