Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -191,24 +191,23 @@ if query:
|
|
191 |
input_variables=["context","retriever_query","query"],
|
192 |
output_variables=["relevancy_response", "context_number","relevant_contexts","final_response"]
|
193 |
)
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
response = chain.invoke({"query":query,"context":final_output['relevant_contexts']})
|
209 |
|
210 |
-
|
211 |
-
|
212 |
|
213 |
|
214 |
|
|
|
191 |
input_variables=["context","retriever_query","query"],
|
192 |
output_variables=["relevancy_response", "context_number","relevant_contexts","final_response"]
|
193 |
)
|
194 |
+
final_output = context_management_chain({"context":context,"retriever_query":query,"query":query})
|
195 |
+
st.subheader("Final Output from Context Management chain")
|
196 |
+
st.json(final_output)
|
197 |
+
|
198 |
+
st.subheader("Context of Final Output from Context Management chain")
|
199 |
+
st.json(final_output['context'])
|
200 |
+
|
201 |
+
st.header("Relevancy Response")
|
202 |
+
st.json(final_output['relevancy_response'])
|
203 |
+
|
204 |
+
st.subheader("Relevant Context")
|
205 |
+
st.json(final_output['relevant_contexts'])
|
206 |
+
|
207 |
+
response = chain.invoke({"query":query,"context":final_output['relevant_contexts']})
|
|
|
208 |
|
209 |
+
st.subheader("Final Response")
|
210 |
+
st.json(response.content)
|
211 |
|
212 |
|
213 |
|