Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-ao committed Jan 28, 2024
1 parent 94c2876 commit 6e7144e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ def get_response(user_input):
st.session_state.chat_history.append(HumanMessage(content=user_query))
st.session_state.chat_history.append(AIMessage(content=response))

with st.sidebar:
st.write(st.session_state.chat_history)
# conversation
for message in st.session_state.chat_history:
if isinstance(message, AIMessage):
with st.chat_message("AI"):
st.write(message.content)
elif isinstance(message, HumanMessage):
with st.chat_message("Human"):
st.write(message.content)

0 comments on commit 6e7144e

Please sign in to comment.