shujath000 commited on
Commit
111ef00
·
verified ·
1 Parent(s): 68b5105

Update ch.py

Browse files
Files changed (1) hide show
  1. ch.py +1 -1
ch.py CHANGED
@@ -13,7 +13,7 @@ if s=="enter chat bot":
13
  time.sleep(5)
14
  model=l.GoogleGenerativeAI(model="gemini-2.5-flash-lite",api_key=api,max_tokens=10,temperature=0.2)
15
  if not st.session_state:
16
- st.session_state["messages"]=[["system",f"behave like a 1 year experice chat model trainer of {st.session_state["topic"]} Topic you strictly should not discuss anything other that specified topic"]]
17
  prompt=st.chat_input("Type your message")
18
  if prompt:
19
  st.session_state["messages"].append(["user",prompt])
 
13
  time.sleep(5)
14
  model=l.GoogleGenerativeAI(model="gemini-2.5-flash-lite",api_key=api,max_tokens=10,temperature=0.2)
15
  if not st.session_state:
16
+ st.session_state["messages"]=[["system",f"behave like a 1 year experice chat model trainer of {st.session_state.get("topic")} Topic you strictly should not discuss anything other that specified topic"]]
17
  prompt=st.chat_input("Type your message")
18
  if prompt:
19
  st.session_state["messages"].append(["user",prompt])