williamagyapong commited on
Commit
132bff0
·
verified ·
1 Parent(s): 0508be0

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -7
main.py CHANGED
@@ -46,23 +46,23 @@ client = openai.OpenAI(
46
  base_url="https://api.sambanova.ai/v1",
47
  )
48
 
49
- def messenger_button(recipient_phone, ai_response):
50
  messenger.send_button(
51
  recipient_id=recipient_phone,
52
  button={
53
- "header": "Header Testing",
54
  "body": f"{ai_response}",
55
- "footer": "Footer Testing",
56
  "action": {
57
- "button": "Button Testing",
58
  "sections": [
59
  {
60
  "title": "iBank",
61
  "rows": [
62
- {"id": "row 1", "title": "Send Money", "description": ""},
63
  {
64
- "id": "row 2",
65
- "title": "Withdraw money",
66
  "description": "",
67
  },
68
  ],
 
46
  base_url="https://api.sambanova.ai/v1",
47
  )
48
 
49
+ def messenger_button(recipient_phone, ai_response, header='Transaction Confirmation', footer='', btn_name='Confirm Details'):
50
  messenger.send_button(
51
  recipient_id=recipient_phone,
52
  button={
53
+ "header": f"{header}",
54
  "body": f"{ai_response}",
55
+ "footer": f"{footer}",
56
  "action": {
57
+ "button": f"{btn_name}",
58
  "sections": [
59
  {
60
  "title": "iBank",
61
  "rows": [
62
+ {"id": "confirm", "title": "Record Transaction", "description": ""},
63
  {
64
+ "id": "cancel",
65
+ "title": "Cancel Transaction",
66
  "description": "",
67
  },
68
  ],