Let webapp users tweak LLM temperature per-user (internal only) #10

Open
opened 2026-08-20 14:49:55 +00:00 by francesco · 0 comments
Owner

Mirror the existing "Modello AI" model-preference pattern in chat.py:198-228 for temperature. Webapp-only — api//the public widget keeps the fixed configured value, no change there.

  • postgres/1N-user-preferences-temperature.sql — add temperature column to user_preferences (or generalize to a JSONB preferences blob if more per-user LLM knobs are likely later).
  • db.py:67-91 — extend load_preferences()/save_preferences() to include it.
  • chat.py:35-46 — seed st.session_state.llm_config.temperature from saved prefs on session start.
  • chat.py:198-228 — add a st.slider("Temperatura", 0.0, 1.0, ...) next to the model picker in the same expander, same apply/persist/invalidate-agent/rerun flow.

Reference: RAG/config discussion, current conversation — temperature is already a plain field on LLMConfig (config.py:39), so this is wiring existing plumbing, not new architecture.

Mirror the existing "Modello AI" model-preference pattern in chat.py:198-228 for temperature. Webapp-only — api//the public widget keeps the fixed configured value, no change there. - postgres/1N-user-preferences-temperature.sql — add temperature column to user_preferences (or generalize to a JSONB preferences blob if more per-user LLM knobs are likely later). - db.py:67-91 — extend load_preferences()/save_preferences() to include it. - chat.py:35-46 — seed st.session_state.llm_config.temperature from saved prefs on session start. - chat.py:198-228 — add a st.slider("Temperatura", 0.0, 1.0, ...) next to the model picker in the same expander, same apply/persist/invalidate-agent/rerun flow. Reference: RAG/config discussion, current conversation — temperature is already a plain field on LLMConfig (config.py:39), so this is wiring existing plumbing, not new architecture.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
peacelink/ai-assistant#10
No description provided.