Du Mingzhe
commited on
Commit
•
88adf39
1
Parent(s):
bbd69b8
Update
Browse files
app.py
CHANGED
@@ -25,10 +25,10 @@ if prompt := st.chat_input("What's up?"):
|
|
25 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
26 |
with st.chat_message("user"):
|
27 |
st.markdown(prompt)
|
28 |
-
|
29 |
with st.chat_message("assistant"):
|
30 |
stream = llm_client.response_generate(prompt, st.session_state.messages)
|
31 |
response = st.write_stream(stream)
|
32 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
33 |
|
34 |
-
|
|
|
|
25 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
26 |
with st.chat_message("user"):
|
27 |
st.markdown(prompt)
|
|
|
28 |
with st.chat_message("assistant"):
|
29 |
stream = llm_client.response_generate(prompt, st.session_state.messages)
|
30 |
response = st.write_stream(stream)
|
31 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
32 |
|
33 |
+
# Update seesion in Pinecone
|
34 |
+
pinecone_client.update_conversation(sid=st.session_state['sid'], messages=st.session_state.messages, user=st.session_state['user'])
|