Shashank1406
commited on
Commit
•
c9d3743
1
Parent(s):
c018406
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,9 @@ def handle_user_input(user_input):
|
|
120 |
def ask_llm():
|
121 |
user_input = st.session_state["user_input"]
|
122 |
st.session_state.messages.append({"role": "user", "content": user_input})
|
|
|
123 |
inputs = {
|
|
|
124 |
"input": user_input,
|
125 |
}
|
126 |
output = chains_obj.legal_adviser_bot_chain.run(inputs)
|
|
|
120 |
def ask_llm():
|
121 |
user_input = st.session_state["user_input"]
|
122 |
st.session_state.messages.append({"role": "user", "content": user_input})
|
123 |
+
last_5_entries = st.session_state.messages[-5:]
|
124 |
inputs = {
|
125 |
+
"chat_history":last_5_entries,
|
126 |
"input": user_input,
|
127 |
}
|
128 |
output = chains_obj.legal_adviser_bot_chain.run(inputs)
|