Spaces:
Starting
on
T4
Starting
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -386,7 +386,14 @@ if __name__ == '__main__':
|
|
386 |
st.title("Multipurpose AI Agent")
|
387 |
|
388 |
if "qa_prompt" not in st.session_state:
|
389 |
-
st.session_state.qa_prompt =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
|
391 |
if "tooltip" not in st.session_state:
|
392 |
st.session_state.tooltip = 'The AI answer your questions only considering the documents provided'
|
|
|
386 |
st.title("Multipurpose AI Agent")
|
387 |
|
388 |
if "qa_prompt" not in st.session_state:
|
389 |
+
st.session_state.qa_prompt = lambda query, context:
|
390 |
+
f"""You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question. If you don't know the answer, just say that you don't know. Use three sentences maximum and keep the answer concise.
|
391 |
+
|
392 |
+
Question: {query}
|
393 |
+
|
394 |
+
Context: {context}
|
395 |
+
|
396 |
+
Answer:"""
|
397 |
|
398 |
if "tooltip" not in st.session_state:
|
399 |
st.session_state.tooltip = 'The AI answer your questions only considering the documents provided'
|