Skip to content

just-ai/jaicf-jaicp-caila-template

Repository files navigation

JAICF Caila Bot template

Here is a ready to use JAICF bot template that can be ran locally or deployed to JAICP Cloud or Heroku server.

How to use

Please refer to the detailed Quick Start that shows how to use this template with JAICP and CAILA NLU services.

Deploy to Heroku

If you would like to deploy this project to the Heroku cloud, just click on the button below

Deploy

  1. After deployment open the app and copy the URL of the app to clipboard.
  2. Then go to JAICP Web Interface, open your project's settings, select webhook type of connection and paste your URL.
  3. That's it! Now all the channels will communicate through your bot deployed to Heroku.

You can switch project back to long polling instead of webhook once you need to route all messages to your local machine during development.

Docker

To build and run Docker image:

  1. Build project with stage gradle task
  2. Build Docker image with docker build -t jaicf-jaicp-caila-template .
  3. Run Docker image with docker run -p 8080:8080 -e JAICP_API_TOKEN=<your JAICP project token> jaicf-jaicp-caila-template

Note that this builds a webhook version of your JAICF bot. Thus, you have to propagate your local 8080 port to the global web (through some gateway like ngrok) and configure your JAICP project with direct public URL of your machine.

Java options

To pass java options to your Docker image just run it with JAVA_TOOL_OPTIONS environment like:

docker run -p 8080:8080 -e JAICP_API_TOKEN=<your JAICP project token> -e "JAVA_TOOL_OPTIONS=-Xms1024m -Xmx2048m" jaicf-jaicp-caila-template

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •