Update prompts.py
Browse files- prompts.py +3 -2
prompts.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# prompts.py
|
|
|
|
| 2 |
from langchain.prompts import PromptTemplate
|
| 3 |
|
| 4 |
classification_prompt_str = """
|
|
@@ -44,13 +45,13 @@ Important guidelines:
|
|
| 44 |
Final Answer (in your own words, do NOT quote the sources directly):
|
| 45 |
"""
|
| 46 |
|
| 47 |
-
|
| 48 |
refusal_prompt_str = """
|
| 49 |
This question is neither wellness-related nor brand-related.
|
| 50 |
Write a short, polite refusal that gently explains we only handle daily wellness or brand questions about DailyWellnessAI.
|
| 51 |
"""
|
| 52 |
|
| 53 |
-
#
|
| 54 |
classification_prompt = PromptTemplate(
|
| 55 |
template=classification_prompt_str,
|
| 56 |
input_variables=["query"]
|
|
|
|
| 1 |
# prompts.py
|
| 2 |
+
|
| 3 |
from langchain.prompts import PromptTemplate
|
| 4 |
|
| 5 |
classification_prompt_str = """
|
|
|
|
| 45 |
Final Answer (in your own words, do NOT quote the sources directly):
|
| 46 |
"""
|
| 47 |
|
| 48 |
+
# Refusal when the question does not fit in wellness or brand-related topics.
|
| 49 |
refusal_prompt_str = """
|
| 50 |
This question is neither wellness-related nor brand-related.
|
| 51 |
Write a short, polite refusal that gently explains we only handle daily wellness or brand questions about DailyWellnessAI.
|
| 52 |
"""
|
| 53 |
|
| 54 |
+
# Modify prompt templates to work with chat history if needed
|
| 55 |
classification_prompt = PromptTemplate(
|
| 56 |
template=classification_prompt_str,
|
| 57 |
input_variables=["query"]
|