CosmoAI commited on
Commit
be05854
·
1 Parent(s): ead288e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -59,7 +59,7 @@ def responsenew(data):
59
  print("Invalid JSON:", e)
60
  response = palm.chat( messages=text)
61
  print(f"\n{response.last}")
62
- if data is not None:
63
  if "remind me" in text:
64
  values = getValues(text)
65
  msg = values[0]
@@ -82,7 +82,7 @@ def responsenew(data):
82
  else:
83
  reps = "Once"
84
  respo = {
85
- 'messages': f"Message: {msg} \nTime: {time} \nDay: {day} \nCreated Successfully.",
86
  'action': "create_reminder",
87
  'function': {
88
  'id': idval,
@@ -114,7 +114,7 @@ def responsenew(data):
114
 
115
  elif "add to do" in text:
116
  respo = {
117
- 'messages': "Todo added!",
118
  'action': "create_todo",
119
  'function': {
120
  'name': 'defaulttodo',
@@ -140,7 +140,7 @@ def responsenew(data):
140
  # 4. Join the words back into a string (if needed):
141
  result_string = " ".join(first_two_words)
142
  respo = {
143
- 'messages': "I have noted your message.",
144
  'action': "create_note",
145
  'function': {
146
  'title': result_string,
 
59
  print("Invalid JSON:", e)
60
  response = palm.chat( messages=text)
61
  print(f"\n{response.last}")
62
+ if text is not None:
63
  if "remind me" in text:
64
  values = getValues(text)
65
  msg = values[0]
 
82
  else:
83
  reps = "Once"
84
  respo = {
85
+ 'message': f"Message: {msg} \nTime: {time} \nDay: {day} \nCreated Successfully.",
86
  'action': "create_reminder",
87
  'function': {
88
  'id': idval,
 
114
 
115
  elif "add to do" in text:
116
  respo = {
117
+ 'message': "Todo added!",
118
  'action': "create_todo",
119
  'function': {
120
  'name': 'defaulttodo',
 
140
  # 4. Join the words back into a string (if needed):
141
  result_string = " ".join(first_two_words)
142
  respo = {
143
+ 'message': "Got it! Saved to your notes.",
144
  'action': "create_note",
145
  'function': {
146
  'title': result_string,