Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the version of Werkzeug. #60

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update to reply config message
billy3321 committed May 4, 2024
commit 76c079604cb74a9a90a6665ee66172232fc48dc5
3 changes: 3 additions & 0 deletions config/config.yml.example
Original file line number Diff line number Diff line change
@@ -19,4 +19,7 @@ db:
sslkey:

logfile: ./logs/linebot.log

commands:
help: "這裡是台南市議會聊天機器人,目前已經輸入了台南市議會第四屆公開議事錄中的會議逐字稿,請輸入您的問題,以便我檢索逐字稿內容來回應您。若您希望重設聊天內容,請輸入「/reset」以重置聊天。"
...
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -71,8 +71,12 @@ def handle_assistant_message(user_id, text):
msg = TextMessage(text='Reset The Chatbot.')
else:
msg = TextMessage(text='Nothing to reset.')
elif text.startswith('/help'):
msg = TextMessage(text="這裡是台南市議會聊天機器人,目前已經輸入了台南市議會第四屆公開議事錄中的會議逐字稿,請輸入您的問題,以便我檢索逐字稿內容來回應您。若您希望重設聊天內容,請輸入「/reset」以重置聊天。\n\n")
elif text.startswith('/'):
command = input_string[1:].split()[0]
if command in message_dict:
msg = TextMessage(text=message_dict[command] + "\n\n")
else:
msg = TextMessage(text="Command not found.")
else:
thread_id = database.query_thread(user_id)
if thread_id: