Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -202,7 +202,7 @@ def create_qa_chain(prompt, db):
|
|
202 |
def custom_llm(query, context):
|
203 |
full_prompt = prompt.format(context=context, question=query)
|
204 |
response = model.generate_content(full_prompt)
|
205 |
-
if "
|
206 |
response = model.generate_content(query)
|
207 |
return response.text
|
208 |
|
|
|
202 |
def custom_llm(query, context):
|
203 |
full_prompt = prompt.format(context=context, question=query)
|
204 |
response = model.generate_content(full_prompt)
|
205 |
+
if "câu trả lời không có trong ngữ cảnh" in response.text:
|
206 |
response = model.generate_content(query)
|
207 |
return response.text
|
208 |
|