Abhaykoul commited on
Commit
07d6350
·
verified ·
1 Parent(s): 9235666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -369,7 +369,14 @@ async def adv_web_search(
369
  extracted_text += f"## Content from: {result['link']}\n\n{result['text']}\n\n"
370
 
371
  # 3. Construct the prompt for FastAI
372
- ai_prompt = f"Query by user: {q}. Answer the query asked by the user in detail. Search Result: {extracted_text}"
 
 
 
 
 
 
 
373
 
374
  # 4. Get the FastAI's response using FastAI service
375
  try:
 
369
  extracted_text += f"## Content from: {result['link']}\n\n{result['text']}\n\n"
370
 
371
  # 3. Construct the prompt for FastAI
372
+ ai_prompt = (
373
+ f"User Query: {q}\n\n"
374
+ f"Please provide a detailed and accurate answer to the user's query. Include relevant information extracted from the search results below. Ensure to cite sources by providing links to the original content where applicable. Format your response as follows:\n\n"
375
+ f"1. **Answer:** Provide a clear and comprehensive answer to the user's query.\n"
376
+ f"2. **Details:** Include any additional relevant details or explanations.\n"
377
+ f"3. **Sources:** List the sources of the information with clickable links for further reading.\n\n"
378
+ f"Search Results:\n{extracted_text}"
379
+ )
380
 
381
  # 4. Get the FastAI's response using FastAI service
382
  try: