We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e44db6b commit bf17844Copy full SHA for bf17844
Pyton bi gpt
@@ -0,0 +1,21 @@
1
+# app.py
2
+from flask import Flask, request
3
+from twilio.twiml.messaging_response import MessagingResponse
4
+
5
+app = Flask(__name__)
6
7
+@app.route("/webhook", methods=["POST"])
8
+def whatsapp_webhook():
9
+ incoming_msg = request.values.get('Body', '').lower()
10
+ resp = MessagingResponse()
11
+ msg = resp.message()
12
13
+ if 'привет' in incoming_msg:
14
+ msg.body("Привет! Вы заказчик или исполнитель?")
15
+ else:
16
+ msg.body("Я не понял. Напиши 'привет' для начала.")
17
18
+ return str(resp)
19
20
+if __name__ == "__main__":
21
+ app.run()
0 commit comments