Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,35 +40,6 @@ palm.configure(api_key=os.environ["PALM_KEY"])
|
|
| 40 |
# - You can start a timer or a stopwatch\n\n"""
|
| 41 |
|
| 42 |
|
| 43 |
-
# * if intent = viewing user's notes return = "view_notes"
|
| 44 |
-
# * if intent = viewing user's posts return = "view_posts"
|
| 45 |
-
# * if intent = viewing user's shared notes return = "view_shared_notes"
|
| 46 |
-
# * if intent = viewing user's todo lists return = "view_todo_lists"
|
| 47 |
-
# * if intent = viewing user's shared todo lists return = "view_shared_todo_lists"
|
| 48 |
-
# * if intent = viewing user's shared routines return = "view_shared_routines"
|
| 49 |
-
# * if intent = creating a goal return = "create_goal"
|
| 50 |
-
# * if intent = creating a reminder return = "create_reminder"
|
| 51 |
-
# * if intent = creating a routine return = "create_routine"
|
| 52 |
-
# * if intent = creating a group return = "create_group"
|
| 53 |
-
# * if intent = creating a community return = "create_community"
|
| 54 |
-
# * if intent = creating a note return = "create_note"
|
| 55 |
-
# * if intent = creating a post return = "create_post"
|
| 56 |
-
# * if intent = creating a todo list return = "create_todo_list"
|
| 57 |
-
# * if intent = sharing a reminder return = "share_reminder"
|
| 58 |
-
# * if intent = sharing a routine return = "share_routine"
|
| 59 |
-
# * if intent = sharing a group return = "share_group"
|
| 60 |
-
# * if intent = sharing a todo list return = "share_todo_list"
|
| 61 |
-
# * if intent = sharing a note return = "share_note"
|
| 62 |
-
|
| 63 |
-
# Return the intent as one-word string representing the user's intent, as mentioned below:
|
| 64 |
-
# * if intent is purchasing coins return "purchase_coins"
|
| 65 |
-
# * if intent is viewing friends return "view_friends"
|
| 66 |
-
# * if intent is viewing groups joined return "view_groups"
|
| 67 |
-
# * if intent is viewing communities joined return "view_communities"
|
| 68 |
-
# * if intent is viewing shared reminders return "shared_reminders"
|
| 69 |
-
# * if intent is viewing user's routines return "my_routines"
|
| 70 |
-
# * if intent is viewing all the groups existing return "view_all_groups"
|
| 71 |
-
# * if intent is viewing all the communities existing return "view_all_communities"
|
| 72 |
|
| 73 |
|
| 74 |
def responsenew(data):
|
|
@@ -105,6 +76,7 @@ def responsenew(data):
|
|
| 105 |
* if intent = sharing a todo list return = "share_todo_list"
|
| 106 |
* if intent = sharing a note return = "share_note"
|
| 107 |
* if intent is notify then return "send_notify"
|
|
|
|
| 108 |
|
| 109 |
""",
|
| 110 |
)
|
|
@@ -159,6 +131,12 @@ def responsenew(data):
|
|
| 159 |
"action": "send_notify",
|
| 160 |
"function": "nothing",
|
| 161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
else:
|
| 163 |
respo = {
|
| 164 |
"message": response.last,
|
|
|
|
| 40 |
# - You can start a timer or a stopwatch\n\n"""
|
| 41 |
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
|
| 45 |
def responsenew(data):
|
|
|
|
| 76 |
* if intent = sharing a todo list return = "share_todo_list"
|
| 77 |
* if intent = sharing a note return = "share_note"
|
| 78 |
* if intent is notify then return "send_notify"
|
| 79 |
+
* if intent is show all commands then return "show_all_commands"
|
| 80 |
|
| 81 |
""",
|
| 82 |
)
|
|
|
|
| 131 |
"action": "send_notify",
|
| 132 |
"function": "nothing",
|
| 133 |
}
|
| 134 |
+
elif "show_all_commands" in intent.last:
|
| 135 |
+
respo = {
|
| 136 |
+
"message": "",
|
| 137 |
+
"action": "show_all_commands",
|
| 138 |
+
"function": "nothing",
|
| 139 |
+
}
|
| 140 |
else:
|
| 141 |
respo = {
|
| 142 |
"message": response.last,
|