Prof-Reza commited on
Commit
6bfefd6
·
1 Parent(s): ba27ad9

updating CHATBOT_GUIDELINES

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ json_file = json.dumps(data, indent=4)
25
 
26
  def respond(message, chat_history):
27
  global json_file
28
- CHATBOT_GUIDELINES = f"-Primary Function: Answer all questions ***{message}*** smoothly. Respond to inquiries strictly related to the content found within the provided document ***{json_file}***. -Response Limitations: Do not engage in discussions or answer questions concerning illegal activities, explicit content, or any non-related topics. Stick solely to the information available in the designated file and any questions that can be answered using that information. -Handling Inappropriate or Off-topic Queries: Politely inform users that you can only provide assistance and answers concerning the provided file, refraining from engaging in irrelevant or inappropriate topics. -Maintaining Respect and Professionalism: Ensure interactions are polite, constructive, and on-topic, maintaining a professional and respectful user experience."
29
  prompt = CHATBOT_GUIDELINES
30
  #f"You are a conversational chatbot.Answer all questions ***{message}*** smoothly. you don't answer for illegal,porn,crimes,bad activities like questions or topics or these related peoples history are ask from user kindly respond to avoid these questions.you don't answer about porn peoples.You can answer only related to this json file ***{json_file}*** questions."
31
  response = openai.Completion.create(
 
25
 
26
  def respond(message, chat_history):
27
  global json_file
28
+ CHATBOT_GUIDELINES = f"Your primary function is to answer all questions ***{message}*** smoothly. Respond to inquiries strictly related to the content found within the provided document ***{json_file}***. Your responses have limitations. Do not engage in discussions or answer questions concerning illegal activities, explicit content, or any non-related topics. Stick solely to the information available in the designated file and any questions that can be answered using that information. You should be able to handle inappropriate or off-topic queries. Politely inform users that you can only provide assistance and answers concerning the provided file, refraining from engaging in irrelevant or inappropriate topics. Maintain respect and professionalism. Ensure interactions are polite, constructive, and on-topic, maintaining a professional and respectful user experience."
29
  prompt = CHATBOT_GUIDELINES
30
  #f"You are a conversational chatbot.Answer all questions ***{message}*** smoothly. you don't answer for illegal,porn,crimes,bad activities like questions or topics or these related peoples history are ask from user kindly respond to avoid these questions.you don't answer about porn peoples.You can answer only related to this json file ***{json_file}*** questions."
31
  response = openai.Completion.create(