Update main.py
Browse files
main.py
CHANGED
@@ -748,9 +748,9 @@ def handle_text_message(event):
|
|
748 |
app.logger.info("Got x-line-request-id: " + e.headers['x-line-request-id'])
|
749 |
app.logger.info("Got response with http body: " + str(ErrorResponse.from_json(e.body)))
|
750 |
else:
|
751 |
-
|
752 |
-
|
753 |
-
response = query({"inputs": input,"parameters":{"return_full_text":False,"max_length":1024}})
|
754 |
html_msg = markdown.markdown(response)
|
755 |
soup = BeautifulSoup(html_msg, 'html.parser')
|
756 |
line_bot_api.reply_message(
|
|
|
748 |
app.logger.info("Got x-line-request-id: " + e.headers['x-line-request-id'])
|
749 |
app.logger.info("Got response with http body: " + str(ErrorResponse.from_json(e.body)))
|
750 |
else:
|
751 |
+
chat = get_chat(event.source.user_id)
|
752 |
+
response = chat.send_message(text).text
|
753 |
+
# response = query({"inputs": input,"parameters":{"return_full_text":False,"max_length":1024}})
|
754 |
html_msg = markdown.markdown(response)
|
755 |
soup = BeautifulSoup(html_msg, 'html.parser')
|
756 |
line_bot_api.reply_message(
|