Update app.py
Browse files
app.py
CHANGED
|
@@ -448,7 +448,8 @@ Write a detailed and complete response that answers the following user question:
|
|
| 448 |
instruction = f"""Using the following context:
|
| 449 |
{context}
|
| 450 |
Write a detailed and complete research document that fulfills the following user request: '{query}'
|
| 451 |
-
|
|
|
|
| 452 |
|
| 453 |
inputs = [
|
| 454 |
{"role": "system", "content": instruction},
|
|
@@ -512,7 +513,8 @@ def get_response_with_search(query, model, num_calls=3, temperature=0.2):
|
|
| 512 |
prompt = f"""You are an expert AI named Sentinel and have been given a task to create a detailed and complete research article using the following context from web search results:
|
| 513 |
{context} that fulfills the following user request: '{query}'
|
| 514 |
Cover all the key points discussed in the {context} provided to you. Also stick with the context provided to you do not report any misleading or out of context information.
|
| 515 |
-
|
|
|
|
| 516 |
|
| 517 |
if model == "@cf/meta/llama-3.1-8b-instruct":
|
| 518 |
# Use Cloudflare API
|
|
|
|
| 448 |
instruction = f"""Using the following context:
|
| 449 |
{context}
|
| 450 |
Write a detailed and complete research document that fulfills the following user request: '{query}'
|
| 451 |
+
Also the generated response should include the source URL as a hyperlink within the text. Ensure that the hyperlink is embedded in a relevant phrase or word within the response.
|
| 452 |
+
Format the hyperlink in Markdown (e.g., [relevant text](URL))."""
|
| 453 |
|
| 454 |
inputs = [
|
| 455 |
{"role": "system", "content": instruction},
|
|
|
|
| 513 |
prompt = f"""You are an expert AI named Sentinel and have been given a task to create a detailed and complete research article using the following context from web search results:
|
| 514 |
{context} that fulfills the following user request: '{query}'
|
| 515 |
Cover all the key points discussed in the {context} provided to you. Also stick with the context provided to you do not report any misleading or out of context information.
|
| 516 |
+
Also the generated response should include the source URL as a hyperlink within the text. Ensure that the hyperlink is embedded in a relevant phrase or word within the response.
|
| 517 |
+
Format the hyperlink in Markdown (e.g., [relevant text](URL))."""
|
| 518 |
|
| 519 |
if model == "@cf/meta/llama-3.1-8b-instruct":
|
| 520 |
# Use Cloudflare API
|