followup retrieval fix
Browse files
app.py
CHANGED
@@ -114,12 +114,16 @@ def app():
|
|
114 |
_inputs = RunnableParallel(
|
115 |
standalone_question=RunnablePassthrough.assign(
|
116 |
chat_history=lambda x: chistory
|
117 |
-
)
|
|
|
|
|
|
|
118 |
)
|
119 |
_context = {
|
120 |
"context": itemgetter("standalone_question") | retriever | _combine_documents,
|
121 |
"question": lambda x: x["standalone_question"],
|
122 |
}
|
|
|
123 |
conversational_qa_chain = _inputs | _context | ANSWER_PROMPT | llm
|
124 |
|
125 |
st.header("Ask Away!")
|
|
|
114 |
_inputs = RunnableParallel(
|
115 |
standalone_question=RunnablePassthrough.assign(
|
116 |
chat_history=lambda x: chistory
|
117 |
+
)
|
118 |
+
| CONDENSE_QUESTION_PROMPT
|
119 |
+
| llmc
|
120 |
+
| StrOutputParser(),
|
121 |
)
|
122 |
_context = {
|
123 |
"context": itemgetter("standalone_question") | retriever | _combine_documents,
|
124 |
"question": lambda x: x["standalone_question"],
|
125 |
}
|
126 |
+
|
127 |
conversational_qa_chain = _inputs | _context | ANSWER_PROMPT | llm
|
128 |
|
129 |
st.header("Ask Away!")
|