Overview

Simple Chatbot API Document.

Welcome API

챗봇 최초 진입 시 호출하며 초기 인사말과 해당 채팅에서 사용할 세션 ID를 반환함.

Request parameters

Parameter Description

targetBot

chatbot id want to talk

Response headers

Name Description

CHAT-SESSION-ID

session value for chat

Content-Type

response content type

Response body

{
  "text" : "안녕하세요!",
  "_links" : {
    "query" : {
      "href" : "http://localhost:8080/chat/query"
    }
  }
}

Response fields

Path Type Description

text

String

answer of chatbot

_links.query.href

String

chat query link after welcome

HTTP/1.1 200 OK
CHAT-SESSION-ID: 8b7bb025-8d0c-46c9-9281-6790b6003a92
Content-Type: application/hal+json
Content-Length: 132

{
  "text" : "안녕하세요!",
  "_links" : {
    "query" : {
      "href" : "http://localhost:8080/chat/query"
    }
  }
}

Query API

챗봇에 질의를 하고 그에 대한 응답을 반환함.

Request parameters

Parameter Description

targetBot

chatbot id want to talk

queryText

questions to ask the chatbot

chatSessionId

id created by welcome api

Response body

{
  "text" : "마지막에 말씀을 잘 못 이해 한것 같아요.",
  "_links" : {
    "query" : {
      "href" : "http://localhost:8080/chat/query"
    }
  }
}

Response fields

Path Type Description

text

String

answer of chatbot

_links.query.href

String

chat query link after welcome