Skip to content

Latest commit

 

History

70 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThothNodeJS

ThothNodeJS provides RESTful services of Thoth. This is the project of a Conversational Agent, the Robot Brain of GBS Innovation Center

API reference

Conversation

POST: /api/message

Content-Type: application/json

HTTP Request body:

Parameter Type Required Note
input object required
context object The context is generated from Watson Conversaion

input scheme:

Parameter Type Required
text string required

context scheme:

Parameter Type Required
conversation_id string required
system object required
defaultCounter integer required
system scheme:
Parameter Type Required
dialog_stack array<string> required
dialog_turn_counter integer required
dialog_request_counter integer required

Sample of HTTP request body:

{
  "input": {
    "text": "hello"
  },
  "context": {
    "conversation_id": "6e71bb87-ac67-448c-ae8c-28b422b9c9d8",
    "system": {
      "dialog_stack": [
        "root"
      ],
      "dialog_turn_counter": 2,
      "dialog_request_counter": 2
    },
    "defaultCounter": 0
  }
}

Sample of some part of HTTP response body:

{
  "input": {"text": "sample"},
   "output":{
      "log_messages": [],
      "text": "This is a sample",
      "api": "getSample()",
      "synthesizableText": "This is the synthesizableText for the sample.",
      "specialContent": {"data": [
            {"Name": "ABC",
             "Info": "This is ABC",
             "MimeList": [
                {"Type": "audio","URL": "<URL>"},
                {"Type": "vedio","URL": "<URL>"},
                {"Type": "graphic","URL": "<URL>"}
             ]}
        ]}
   }
}

Greeting

GET: /api/greeting

Content-Type: application/json

HTTP Request body:

Parameter Type Required Note
id object required List of userid seperated by comma ',' example:"user01,user02"
dept object required The department code of the userId

id scheme:

Parameter Type Required
text string[] required

dept scheme:

Parameter Type Required
text string required
## Graphic GET: `/api/graphic`

Content-Type: application/json

#License Copyright 2016 GCG GBS CTO Office under the Apache 2.0 license.

About

[Deprecated] ThothNodeJS provides RESTful services of Thoth. This is the project of a Conversational Agent, the Robot Brain of GBS Innovation Center

Resources

Stars

1 star

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages