Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -79,7 +79,7 @@ async def webhook(
|
|
| 79 |
chat_sessions = {}
|
| 80 |
@line_handler.add(MessageEvent, message=(ImageMessage, TextMessage))
|
| 81 |
def handle_image_message(event):
|
| 82 |
-
|
| 83 |
# chat = chat_sessions.get(user_id) or client.chats.create(model="gemini-2.0-flash", config=generation_config)
|
| 84 |
# chat_sessions[user_id] = chat
|
| 85 |
user_text = event.message.text if event.message.type == "text" else None
|
|
|
|
| 79 |
chat_sessions = {}
|
| 80 |
@line_handler.add(MessageEvent, message=(ImageMessage, TextMessage))
|
| 81 |
def handle_image_message(event):
|
| 82 |
+
user_id = event.source.user_id
|
| 83 |
# chat = chat_sessions.get(user_id) or client.chats.create(model="gemini-2.0-flash", config=generation_config)
|
| 84 |
# chat_sessions[user_id] = chat
|
| 85 |
user_text = event.message.text if event.message.type == "text" else None
|