Evaaaaa06 commited on
Commit
e297b18
·
verified ·
1 Parent(s): ae989a7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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
- if GeneAI:
174
- history.append({"role": "model", "parts": [GeneAI]})
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)