Update main.py
Browse files
main.py
CHANGED
|
@@ -170,8 +170,8 @@ def handle_image_message(event):
|
|
| 170 |
store_user_message(user_id, "text", prompt)
|
| 171 |
|
| 172 |
history = [{"role": "user", "parts": [store_user_message]}]
|
| 173 |
-
|
| 174 |
-
|
| 175 |
|
| 176 |
# 使用 Gemini 模型生成文字
|
| 177 |
chat = model.start_chat(history=history)
|
|
|
|
| 170 |
store_user_message(user_id, "text", prompt)
|
| 171 |
|
| 172 |
history = [{"role": "user", "parts": [store_user_message]}]
|
| 173 |
+
if GeneAI:
|
| 174 |
+
history.append({"role": "model", "parts": [GeneAI]})
|
| 175 |
|
| 176 |
# 使用 Gemini 模型生成文字
|
| 177 |
chat = model.start_chat(history=history)
|