Skip to content

Commit 10fcdaa

Browse files
committed
Updated model format
1 parent 60c1dd9 commit 10fcdaa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

safe_infer_chatbot_app/safe_infer_chatbot.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
LLM_PROVIDER_API_ENDPOINT = f"{API_BASE_URL}/api/llm/provider"
7171
SELECTED_MODEL = os.getenv("MODEL")
7272
X_PEBBLO_USER = os.getenv("X_PEBBLO_USER", None)
73+
MODEL_NAME = os.getenv("MODEL_NAME", SELECTED_MODEL)
7374

7475
# Initialize session state
7576
if 'chat_history' not in st.session_state:
@@ -78,6 +79,8 @@
7879
st.session_state.selected_model = SELECTED_MODEL
7980
if 'api_key' not in st.session_state:
8081
st.session_state.api_key = API_KEY
82+
if 'model_name' not in st.session_state:
83+
st.session_state.model_name = MODEL_NAME
8184

8285
def test_api_connection() -> Dict[str, Any]:
8386
"""Test the API connection"""
@@ -174,7 +177,11 @@ def display_chat_message(role: str, content: str, model: str = "", timestamp: st
174177
# Statistics
175178
st.subheader("📊 Statistics")
176179
st.metric("Messages", len(st.session_state.chat_history))
177-
st.metric("Current Model", st.session_state.selected_model)
180+
st.markdown(f"""
181+
<div style="font-size:0.8rem;">
182+
Current Model: <br><span style="font-size:1.2rem;"><b>{st.session_state.model_name}</b></span>
183+
</div>
184+
""", unsafe_allow_html=True)
178185

179186
# Welcome message
180187
st.markdown(f"""

0 commit comments

Comments
 (0)