CosmoAI commited on
Commit
86c27ed
·
1 Parent(s): a44175d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -12,11 +12,18 @@ palm.configure(api_key=os.environ['PALM_KEY'])
12
 
13
  def responsenew(data):
14
  response = palm.chat(messages=data)
15
- respo = {
16
- "message": response.last,
17
- "action": "show_friends",
18
- "function": "nothing"
19
- }
 
 
 
 
 
 
 
20
  print(data)
21
  return json.dumps(respo)
22
 
 
12
 
13
  def responsenew(data):
14
  response = palm.chat(messages=data)
15
+ if response.last contains "payment":
16
+ respo = {
17
+ "message": response.last,
18
+ "action": "payment",
19
+ "function": "nothing"
20
+ }
21
+ elif response.last contains "show friends":
22
+ respo = {
23
+ "message": response.last,
24
+ "action": "show_friends",
25
+ "function": "nothing"
26
+ }
27
  print(data)
28
  return json.dumps(respo)
29