Spaces:
Running
Running
add real time search
Browse files
app.py
CHANGED
@@ -121,7 +121,9 @@ def should_use_search(query: str) -> bool:
|
|
121 |
|
122 |
# Construct the prompt with optional search context
|
123 |
def construct_model_prompt(user_query: str, search_context: str, history: List[Tuple[str, str]]) -> str:
|
124 |
-
instructions =
|
|
|
|
|
125 |
prompt = f"{instructions}\n\n{search_context if search_context else ''}\n\n{user_query} ?\n\n"
|
126 |
return prompt
|
127 |
|
|
|
121 |
|
122 |
# Construct the prompt with optional search context
|
123 |
def construct_model_prompt(user_query: str, search_context: str, history: List[Tuple[str, str]]) -> str:
|
124 |
+
instructions = (
|
125 |
+
"Based on the information provided below, deliver an accurate, concise, and easily understandable answer. If relevant information is missing, draw on your general knowledge and mention the absence of specific details."
|
126 |
+
)
|
127 |
prompt = f"{instructions}\n\n{search_context if search_context else ''}\n\n{user_query} ?\n\n"
|
128 |
return prompt
|
129 |
|