This is an example of replies that consumes Ultimate.ai Api. It was built using Nest.
- For a first attempt, try to run using docker. All services are ready to be runned using
docker-compose
.
- Make a copy of
.env-sample
to.env
- Insert Ultimate Auth Params into these ENVs
ULTIMATE_BOT_ID=
ULTIMATE_APIKEY=
ULTIMATE_HOST=
Atention: This step is important to load an initial Answers List
$ docker-compose up --build seed
# Run all resources
$ docker-compose up
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
- After running, access
http://localhost:3000/api
. This is a Swagger Documentation to test all endpoints available.
- POST to
messages
: Request
curl -X 'POST' \
'http://localhost:3000/messages' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"botId": "12345",
"message": "Hello!"
}'
Response
{
"_id": "60adc65875b9c700e36d139c",
"botId": "12345",
"message": "Hello!",
"reply": "Hey, what's up! How can I help you?",
"intent": "Greeting",
"__v": 0
}
Nest is MIT licensed.