Shreyas094 commited on
Commit
a5c3fd1
·
verified ·
1 Parent(s): be22620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- After writing the document, please provide a list of sources used in your response."""
 
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
- After writing the document, please provide a list of sources used in your response."""
 
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