Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -94,10 +94,6 @@ def get_vectorstore_from_url(url):
|
|
94 |
|
95 |
|
96 |
|
97 |
-
print("-----")
|
98 |
-
print(vector_store.similarity_search("What is ALiBi?"))
|
99 |
-
print("-----")
|
100 |
-
|
101 |
#######
|
102 |
# create a vectorstore from the chunks
|
103 |
|
@@ -186,7 +182,7 @@ def get_response(user_input):
|
|
186 |
|
187 |
#vs = get_vectorstore_from_url(user_url, all_domain)
|
188 |
vs = get_vectorstore_from_url("https://www.bofrost.de/shop/fertige-gerichte_5507/auflaeufe_5509/hack-wirsing-auflauf.html?position=1&clicked=")
|
189 |
-
|
190 |
chat_history =[]
|
191 |
retriever_chain = get_context_retriever_chain(vs)
|
192 |
conversation_rag_chain = get_conversational_rag_chain(retriever_chain)
|
@@ -223,16 +219,17 @@ def get_response(message, history):
|
|
223 |
|
224 |
#vs = get_vectorstore_from_url(user_url, all_domain)
|
225 |
vs = get_vectorstore_from_url("https://www.bofrost.de/shop/fertige-gerichte_5507/auflaeufe_5509/hack-wirsing-auflauf.html?position=1&clicked=")
|
226 |
-
|
227 |
history =[]
|
228 |
retriever_chain = get_context_retriever_chain(vs)
|
229 |
conversation_rag_chain = get_conversational_rag_chain(retriever_chain)
|
230 |
|
231 |
response = conversation_rag_chain.invoke({
|
232 |
"chat_history": history,
|
233 |
-
"input": message
|
|
|
234 |
})
|
235 |
-
print(response)
|
236 |
return response#['answer']#[-1]['generation']['content']
|
237 |
|
238 |
|
|
|
94 |
|
95 |
|
96 |
|
|
|
|
|
|
|
|
|
97 |
#######
|
98 |
# create a vectorstore from the chunks
|
99 |
|
|
|
182 |
|
183 |
#vs = get_vectorstore_from_url(user_url, all_domain)
|
184 |
vs = get_vectorstore_from_url("https://www.bofrost.de/shop/fertige-gerichte_5507/auflaeufe_5509/hack-wirsing-auflauf.html?position=1&clicked=")
|
185 |
+
# print("------ here 22 " )
|
186 |
chat_history =[]
|
187 |
retriever_chain = get_context_retriever_chain(vs)
|
188 |
conversation_rag_chain = get_conversational_rag_chain(retriever_chain)
|
|
|
219 |
|
220 |
#vs = get_vectorstore_from_url(user_url, all_domain)
|
221 |
vs = get_vectorstore_from_url("https://www.bofrost.de/shop/fertige-gerichte_5507/auflaeufe_5509/hack-wirsing-auflauf.html?position=1&clicked=")
|
222 |
+
|
223 |
history =[]
|
224 |
retriever_chain = get_context_retriever_chain(vs)
|
225 |
conversation_rag_chain = get_conversational_rag_chain(retriever_chain)
|
226 |
|
227 |
response = conversation_rag_chain.invoke({
|
228 |
"chat_history": history,
|
229 |
+
"input": message,
|
230 |
+
"chat_message": message
|
231 |
})
|
232 |
+
print("get_response " +response)
|
233 |
return response#['answer']#[-1]['generation']['content']
|
234 |
|
235 |
|