Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -159,14 +159,14 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
|
|
159 |
|
160 |
|
161 |
|
162 |
-
template = """Your task is as follows: 1. Determine if the input requirement is compliant with the provided context. 2. If the requirement is compliant, report "This requirement is compliant." 3. If the requirement is not compliant report "This requirement is not compliant." 4. If the requirement is not compliant, give the reason for non compliance and return the specific rule or guideline the requirement violates. 5. If the requirement is not compliant, report a refined version of the requirement
|
163 |
-
Context: {context}
|
164 |
Chat History: {chat_history}
|
165 |
-
Follow Up Input: {question}
|
166 |
-
Standalone question:"""
|
167 |
|
168 |
PROMPT = PromptTemplate(
|
169 |
-
input_variables=["context", "chat_history"
|
170 |
template=template
|
171 |
)
|
172 |
|
|
|
159 |
|
160 |
|
161 |
|
162 |
+
template = """Your task is as follows: 1. Determine if the input {requirement} is compliant with the provided {context}. 2. If the {requirement} is compliant, report "This requirement is compliant." 3. If the {requirement} is not compliant report "This requirement is not compliant." 4. If the {requirement} is not compliant, give the reason for non compliance and return the specific rule or guideline the requirement violates from the {context}. 5. If the {requirement} is not compliant, report a refined version of the {requirement} that is compliant with the provided {context}.
|
163 |
+
#Context: {context}
|
164 |
Chat History: {chat_history}
|
165 |
+
#Follow Up Input: {question}
|
166 |
+
"""#Standalone question:"""
|
167 |
|
168 |
PROMPT = PromptTemplate(
|
169 |
+
input_variables=["requirement","context", "chat_history"]#, "question"],
|
170 |
template=template
|
171 |
)
|
172 |
|