unknown commited on
Commit
c19efb8
·
1 Parent(s): 83f4c81
Files changed (1) hide show
  1. main.py +34 -5
main.py CHANGED
@@ -31,6 +31,33 @@ As the pamgolding AI, developed by Tab Robotics, your main responsibility is to
31
 
32
  Please provide the image links if the user asks for it. You are currently chatting with the user and has been appointed as the companies website chat asistant.
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  """
35
 
36
  from data import kb
@@ -85,13 +112,15 @@ def get_response():
85
  if not user_id:
86
  return jsonify({'response': "Error: User ID is missing or invalid."})
87
 
88
- if user_input == "send calendly":
 
 
89
  url = "https://calendly.com/dixith_mediga/30min"
90
- response = '<iframe width="351" height="720" frameborder="0" style="border:0" title="Select a Date & Time - Calendly" src="{}" allowfullscreen></iframe>'.format(url)
91
- else:
92
- response = generate_response(user_input)
93
 
94
  return jsonify({'response': response})
95
 
96
  if __name__ == '__main__':
97
- app.run(host='0.0.0.0', port=7860)
 
31
 
32
  Please provide the image links if the user asks for it. You are currently chatting with the user and has been appointed as the companies website chat asistant.
33
 
34
+ You are the best at classifying if the user wants to hop on a call or not even if the user asks how to hop on a call consider it as a prospect that wants to hop on a call.
35
+ To book an appointment for the users or if the user wants to hop or book a call, follow the steps : Add this code in your response to book a call for the user <-/-/-/>
36
+ Examples :
37
+
38
+ User : How can I book an appointment ?
39
+ You : <-/-/-/>
40
+
41
+ User : Book me an appointment
42
+ You : <-/-/-/>
43
+
44
+ User : I want to hop on a call
45
+ You : <-/-/-/>
46
+
47
+ User : I want to book a call 'or' I want to book a meeting 'or' I want to hop on a call with you guys
48
+ You : <-/-/-/>
49
+
50
+ User : Thanks
51
+ You : No problem, Letme know if you want help with anything else
52
+
53
+ Case 2 : -
54
+ User : Can I book a call ?
55
+ You : <-/-/-/>
56
+
57
+ User : Thanks
58
+ You : No problem, Letme know if you want help with anything else
59
+
60
+ Add the code <-/-/-/> if the user wants to hop on a call this is so important. Follow the instructions really perfectly I don't want anyone to make mistakes.
61
  """
62
 
63
  from data import kb
 
112
  if not user_id:
113
  return jsonify({'response': "Error: User ID is missing or invalid."})
114
 
115
+ response = generate_response(user_input)
116
+
117
+ if '<-/-/-/>' in response:
118
  url = "https://calendly.com/dixith_mediga/30min"
119
+ end_msg = "Please select your preferred time and date"
120
+ response = '<iframe width="351" height="720" frameborder="0" style="border:0" title="Select a Date & Time - Calendly" src="{}" allowfullscreen></iframe>'.format(url) + end_msg
121
+
122
 
123
  return jsonify({'response': response})
124
 
125
  if __name__ == '__main__':
126
+ app.run(host='0.0.0.0', port=7860)