Update app.py
Browse files
app.py
CHANGED
@@ -227,10 +227,13 @@ def get_response(message, history):
|
|
227 |
response = conversation_rag_chain.invoke({
|
228 |
"chat_history": history,
|
229 |
"input": message,
|
230 |
-
"chat_message": message
|
231 |
})
|
232 |
#print("get_response " +response)
|
233 |
-
|
|
|
|
|
|
|
234 |
|
235 |
|
236 |
#####
|
|
|
227 |
response = conversation_rag_chain.invoke({
|
228 |
"chat_history": history,
|
229 |
"input": message,
|
230 |
+
"chat_message": message + " Assistant: "
|
231 |
})
|
232 |
#print("get_response " +response)
|
233 |
+
res = response['answer']
|
234 |
+
parts = res.split(" Assistant: ")
|
235 |
+
last_part = parts[-1]
|
236 |
+
return last_part#[-1]['generation']['content']
|
237 |
|
238 |
|
239 |
#####
|