Update app.py
Browse files
app.py
CHANGED
@@ -369,7 +369,15 @@ 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 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
382 |
# 4. Get the FastAI's response using FastAI service
|
383 |
try:
|