4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

ChatBot 在Line上面的架構

在聊天機器人頻道內,輸入文字時的流程簡圖

用戶Line App ---> Line server ---> Chatbot server ---> Line server ---> 用戶Line App

當我們在規劃聊天機器人時,要有一個概念:

「用戶是不會直接和Chatbot連線的」

站在Line用戶的立場來看,Chatbot是「躲」在Line Server後方,一方面保障了Chatbot的安全(IP不會洩漏),一方面在防火牆上設定單純一些(只允許Line Server的訪問)。

Chatbot server,其實也就只是一個「網站」,Line server會把用戶輸入的資料(文字,圖片,網址等)以JSON的格式傳送過來,Chatbot server每被Line Server「丟」一個JSON過來,就會依程式的設定做出對應的行為,而「大部分」的行為,都是「丟」訊息回去給Line Server,再轉給Line用戶。

Line server其實也就只是一個「中繼站」的角色。

真正的聊天機器人的設計,重心會是在Chatbot server的程式編寫上面。和Line有關的設定比重不大。

下一篇文章,將會介紹Line帳號的設定及限制

0 upvotes $0.00

Replies (1)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: