CosmoAI commited on
Commit
39a156b
·
1 Parent(s): e646f95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -15,12 +15,13 @@ palm.configure(api_key=os.environ['PALM_KEY'])
15
  def responsenew(data):
16
  print(data)
17
  response = palm.chat(messages=data)
18
- intent = palm.chat(messages=f"""From the text given as data below by the user, find out what intention or category does the data fall under out of given 5 intents i.e:\n
19
  1. purchasing coins\n
20
  2. viewing friends list\n
21
  3. viewing groups been joined by the user\n
22
  4. viewing pages been joined by the user\n
23
  5. user is saying to view the reminders been shared to the user or by the user\n
 
24
 
25
  data = {data}\n\n
26
  After you are done find out the intent, answer in one word only the intent. Use the following word for your answer, as given below in sequence to the intent:\n
@@ -28,7 +29,8 @@ def responsenew(data):
28
  2. view_friends\n
29
  3. view_groups\n
30
  4. view_pages\n
31
- 5. sharedrem\n\n
 
32
  Your answer must be of one word only out of these above given 5 words.""")
33
 
34
  # respo = {
@@ -67,6 +69,12 @@ def responsenew(data):
67
  "action": "shared_reminders",
68
  "function": "nothing"
69
  }
 
 
 
 
 
 
70
  else:
71
  respo = {
72
  "message": response.last,
 
15
  def responsenew(data):
16
  print(data)
17
  response = palm.chat(messages=data)
18
+ intent = palm.chat(messages=f"""Identify the user's intent from the given text_data, which can be one of the following:s i.e:\n
19
  1. purchasing coins\n
20
  2. viewing friends list\n
21
  3. viewing groups been joined by the user\n
22
  4. viewing pages been joined by the user\n
23
  5. user is saying to view the reminders been shared to the user or by the user\n
24
+ 6. viewing list of my routines or my reminders\n
25
 
26
  data = {data}\n\n
27
  After you are done find out the intent, answer in one word only the intent. Use the following word for your answer, as given below in sequence to the intent:\n
 
29
  2. view_friends\n
30
  3. view_groups\n
31
  4. view_pages\n
32
+ 5. sharedrem\n
33
+ 6. myroutines\n
34
  Your answer must be of one word only out of these above given 5 words.""")
35
 
36
  # respo = {
 
69
  "action": "shared_reminders",
70
  "function": "nothing"
71
  }
72
+ elif "muroutines" in intent.last:
73
+ respo = {
74
+ "message": "Here's the list of your shared reminders: ",
75
+ "action": "myroutines",
76
+ "function": "nothing"
77
+ }
78
  else:
79
  respo = {
80
  "message": response.last,