Install and run quickstart
Follow this quickstart to achieve the following operations:
-
Send a chat message to the Zoo Chatbot and receive an answer.
-
Send an image of a handwritten number to the Handwriting Recogniser and receive its numerical value.
Build
Run
Ensure RAID is built then run it with an IDE or the command line.
Use the RESTful API
Access the API on the root context path /
:
http://localhost:8080/
The easiest way to call the API operations is to use the Swagger UI. Alternatively, use
Postman or curl
and ensure that the Content-Type
header is set to application/json
.
Send a chat message
Send the following chat request:
{
"message": "any giraffes?"
}
The response is as follows:
Data is truncated for readability. |
{
"category": "animal-list",
"reply": "The zoo has 10 giraffes, 3 elephants, 2 lions and 12 penguins",
"probabilities": [
{
"category": "animal-list",
"probability": 0.6893424773
},
{
"category": "directions",
"probability": 0.0776643807
},
{
"category": "opening-times",
"probability": 0.0776643807
}
]
}
Send an image of a handwritten number
Send the following image recognition request:
{
"fileName": "0.png"
}
The response is as follows:
Data is truncated for readability. |
{
"handwrittenNumber": "0",
"probabilities": [
{
"handwrittenNumber": "0",
"probability": 0.9999525547
},
{
"handwrittenNumber": "2",
"probability": 0.0000418071
},
{
"handwrittenNumber": "6",
"probability": 0.0000029869
}
]
}
Learn more
-
See the Zoo Chatbot tutorial to learn all the Zoo Chatbot operations.
-
See the Handwriting Recogniser tutorial to learn all the Handwriting Recogniser operations.
-
See the API specification for the full specification.