Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ qa_chat_prompt = ChatPromptTemplate.from_messages(
|
|
82 |
"You are a Diabetes eductaor that provide advice to patients."
|
83 |
)
|
84 |
),
|
85 |
-
HumanMessagePromptTemplate.from_template("{
|
86 |
]
|
87 |
)
|
88 |
|
@@ -90,7 +90,7 @@ docs_chain = create_stuff_documents_chain(
|
|
90 |
"READER_MODEL", qa_chat_prompt
|
91 |
)
|
92 |
retrieval_chain = create_retrieval_chain(retriever, docs_chain)
|
93 |
-
response = retrieval_chain.invoke({"
|
94 |
print(response["answer"])
|
95 |
|
96 |
|
|
|
82 |
"You are a Diabetes eductaor that provide advice to patients."
|
83 |
)
|
84 |
),
|
85 |
+
HumanMessagePromptTemplate.from_template("{context}"),
|
86 |
]
|
87 |
)
|
88 |
|
|
|
90 |
"READER_MODEL", qa_chat_prompt
|
91 |
)
|
92 |
retrieval_chain = create_retrieval_chain(retriever, docs_chain)
|
93 |
+
response = retrieval_chain.invoke({"context": "how can I reverse diabetes?"})
|
94 |
print(response["answer"])
|
95 |
|
96 |
|