mou3az commited on
Commit
9a5e9c3
1 Parent(s): 7a3190a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -232,10 +232,12 @@ def Web_Search(history):
232
  source_knowledge = ""
233
 
234
  augmented_prompt = f"""
235
- You are an AI designed to help understand and extract information from provided Search Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance if the answer isn't available.
236
  Query: {message}
237
  Search Content:
238
  {source_knowledge}
 
 
239
  """
240
 
241
  msg=HumanMessage(content=augmented_prompt)
@@ -321,10 +323,12 @@ def Link_Scratch(history):
321
  response_message = "The provided link is empty or does not contain any meaningful words."
322
  else:
323
  augmented_prompt = f"""
324
- You are an AI designed to help understand and extract information from provided Link Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance if the answer isn't available.
325
  Query: {user_message}
326
  Link Content:
327
  {content_data}
 
 
328
  """
329
  message = HumanMessage(content=augmented_prompt)
330
  messages4.append(message)
@@ -377,10 +381,12 @@ def File_Interact(history,filepath):
377
  response_message = "The file is empty or does not contain any meaningful words."
378
  else:
379
  augmented_prompt = f"""
380
- You are an AI designed to help understand and extract information from provided File Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance if the answer isn't available.
381
  Query: {user_message}
382
  File Content:
383
  {content_data}
 
 
384
  """
385
  message = HumanMessage(content=augmented_prompt)
386
  messages5.append(message)
 
232
  source_knowledge = ""
233
 
234
  augmented_prompt = f"""
235
+ You are an AI designed to help understand and extract information from provided Search Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance.
236
  Query: {message}
237
  Search Content:
238
  {source_knowledge}
239
+
240
+ #If the query is not related to specific Search Content, engage in general conversation or provide relevant information from other sources.
241
  """
242
 
243
  msg=HumanMessage(content=augmented_prompt)
 
323
  response_message = "The provided link is empty or does not contain any meaningful words."
324
  else:
325
  augmented_prompt = f"""
326
+ You are an AI designed to help understand and extract information from provided Link Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance.
327
  Query: {user_message}
328
  Link Content:
329
  {content_data}
330
+
331
+ #If the query is not related to specific Link Content, engage in general conversation or provide relevant information from other sources.
332
  """
333
  message = HumanMessage(content=augmented_prompt)
334
  messages4.append(message)
 
381
  response_message = "The file is empty or does not contain any meaningful words."
382
  else:
383
  augmented_prompt = f"""
384
+ You are an AI designed to help understand and extract information from provided File Content. Based on the user's Query, you may need to summarize the text, answer specific questions, or provide guidance.
385
  Query: {user_message}
386
  File Content:
387
  {content_data}
388
+
389
+ #If the query is not related to specific File Content, engage in general conversation or provide relevant information from other sources.
390
  """
391
  message = HumanMessage(content=augmented_prompt)
392
  messages5.append(message)