Spaces:
Sleeping
Sleeping
Update ch.py
Browse files
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
|
| 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])
|