lightmate commited on
Commit
00eb905
1 Parent(s): 93b741a

add real time search

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 = "Use the information below if relevant to provide an accurate and concise answer. If no information is available, rely on your general knowledge."
 
 
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