alanchen1115 commited on
Commit
2f519da
·
verified ·
1 Parent(s): ad630db

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -95,12 +95,11 @@ def handle_message(event):
95
  # 取得使用者輸入的文字
96
  user_input = event.message.text
97
  # 發送使用者的輸入到聊天會話並獲得回應
98
- response = chat_session.send_message(prompt)
99
  if (response.text != None):
100
  # 取得生成結果
101
  out = response.text
102
  else:
103
- # 回覆 "Gemini沒答案!請換個說法!"
104
  out = "Gemini沒答案!請換個說法!"
105
  except:
106
  # 處理錯誤
 
95
  # 取得使用者輸入的文字
96
  user_input = event.message.text
97
  # 發送使用者的輸入到聊天會話並獲得回應
98
+ response = chat_session.send_message(user_input)
99
  if (response.text != None):
100
  # 取得生成結果
101
  out = response.text
102
  else:
 
103
  out = "Gemini沒答案!請換個說法!"
104
  except:
105
  # 處理錯誤