medical-kiban commited on
Commit
e686227
ยท
1 Parent(s): 4100485

no message

Browse files
Files changed (2) hide show
  1. app/app.py +7 -0
  2. requirements.txt +14 -2
app/app.py CHANGED
@@ -62,6 +62,13 @@ async def handle_chatwork_webhook(
62
  room_id = event.get("room_id")
63
  from_account_id = event.get("account_id")
64
  message_id = event.get("message_id")
 
 
 
 
 
 
 
65
 
66
  if room_id and from_account_id and message_id:
67
  # Chatwork API ์—”๋“œํฌ์ธํŠธ
 
62
  room_id = event.get("room_id")
63
  from_account_id = event.get("account_id")
64
  message_id = event.get("message_id")
65
+
66
+ message_body = event.get("body")
67
+ if message_body:
68
+ # strip()์„ ์‚ฌ์šฉํ•˜์—ฌ ์•ž๋’ค ๊ณต๋ฐฑ ๋ฐ ์ค„๋ฐ”๊ฟˆ ๋ฌธ์ž๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.
69
+ cleaned_message = message_body.strip()
70
+ print(f"Received message: {cleaned_message}")
71
+ print(f"Received body: {message_body}")
72
 
73
  if room_id and from_account_id and message_id:
74
  # Chatwork API ์—”๋“œํฌ์ธํŠธ
requirements.txt CHANGED
@@ -1,4 +1,16 @@
1
- uvicorn[standard]
2
  fastapi
 
 
 
 
3
  python-dotenv
4
- requests
 
 
 
 
 
 
 
 
 
1
+
2
  fastapi
3
+ uvicorn[standard]
4
+
5
+ requests
6
+
7
  python-dotenv
8
+
9
+ google-api-python-client
10
+ google-auth-httplib2
11
+ google-auth-oauthlib
12
+
13
+ google-generativeai
14
+ google-cloud-aiplatform
15
+
16
+ pytz