-
Notifications
You must be signed in to change notification settings - Fork 22
Xatkit Options
⚠ This page is out of date and will be reworked soon.
Xatkit supports several options that can be set through its Configuration object. This botConfiguration
object is passed together with the bot model when running the desired bot.
XatkitCore xatkitCore = new XatkitCore(botModel, botConfiguration);
xatkitCore.run();
The type of this object is org.apache.commons.configuration2.Configuration. You can use any of the methods and classes of that Apache library to modify the properties you're interested in.
For instance, you can modify one single property or load a complete .properties file
Configuration botConfiguration = new BaseConfiguration();
botConfiguration.setProperty("xatkit.server.port", 5008); //example to change the port
try {
botConfiguration =
configurations.properties(FinancialsBotSimplified.class.getClassLoader().getResource("bot" +
".properties"));
} catch (ConfigurationException e) {
e.printStackTrace();
System.out.println("file not found");
}
The rest of the article describes the available options of the Xatkit Runtime component and their possible values (note that platform-specific options are detailed in the corresponding platforms' wiki articles).
These options affect Xatkit behavior independently of the selected intent recognition provider and platforms.
Key | Values | Description | Constraint |
---|---|---|---|
xatkit.message.delay |
Integer | The delay (in milliseconds) to wait before sending message | Optional (default 0 ) |
xatkit.recognition.enable_monitoring |
Boolean | Allows to enable/disable intent recognition monitoring | Optional (default true ) |
xatkit.recognition.preprocessors |
List of comma-separated Strings | The name of the pre-processors to activate for the bot (unqualified class names) | Optional (default: empty list) |
xatkit.recognition.postprocessors |
List of comma-separated Strings | The name of the post-processors to activate for the bot (unqualified class names) | Optional (default: empty list) |
xatkit.data.directory |
String | The path of the directory used to store execution data | Optional (default ./data ) |
xatkit.server.port |
Integer | The port used by the Xatkit server to receive events and expose services | Optional (default 5000) |
xatkit.server.public_url |
String | The public URL of the deployed Xatkit server. This value is used to deploy the admin test bot and connect it to the running Xatkit instance. | Optional (the bot will be accessible at http://localhost:5000 if not specified) |
xatkit.server.ssl.keystore |
String | The location of the keystore to use to sign https responses. | Optional (the bot won't support https if not specified). Note: if this property is specified the configuration must contain a value for xatkit.server.public_url . |
xatkit.server.ssl.keystore.store.password |
String | The store password of the SSL keystore | Mandatory if the configuration contains a keystore location |
xatkit.server.ssl.keystore.key.password |
String | The key password of the SSL keystore | Mandatory if the configuration contains a keystore location |
xatkit.platforms.custom.XXX |
String |
XXX must be the name of a platform alias used in the execution model, and the property value is the path of the platform's .platform file. This option allows to decouple the execution model from custom platform location, easing their deployment in production environments (where paths are typically different). Note that custom platforms imported using absolute paths do not need to specify this property. |
Mandatory if the execution model contains platform aliases |
xatkit.libraries.custom.XXX |
String |
XXX must be the name of an intent library alias used in the execution model, and the property value is the path of the library's .intent file. This option allows to decouple the execution model from custom libraries location, easing their deployment in production environments (where paths are typically different). Note that custom libraries imported using absolute paths do not need to specify this property. |
Mandatory if the execution model contains library aliases |
xatkit.platforms.abstract.XXX |
String |
XXX must be an abstract platform name, and the property value the path attribute of the concrete platform to use. For example, the property xatkit.platforms.abstract.ChatPlatform = com.xatkit.plugins.slack.platform.SlackPlatform will start a bot using the implementing the chat platform actions with Slack. |
Mandatory if the execution model uses actions from abstract platforms |
xatkit.event.matcher.print_builder |
Boolean | Debug option that can be enabled to log the content of the EventInstanceBuilder before building the matched EventInstance . This method allows to check the received JSON payload representing the event. |
Optional (default false ) |
These options allow to customize the underlying DialogFlow intent recognition provider. Note that mandatory options only concern bots using a DialogFlow intent recognition provider.
Key | Values | Description | Constraint |
---|---|---|---|
xatkit.dialogflow.projectId |
String | The project ID of the DialogFlow agent used by the bot (see here for more information) | Mandatory |
xatkit.dialogflow.credentials.path |
String | The path of the DialogFlow's credential file that grants access to the agent (see here for more information) | Mandatory |
xatkit.dialogflow.language |
String (DialogFlow language code) | The language used by the DialogFlow agent | Optional (default en-US ) |
xatkit.dialogflow.clean_on_startup |
Boolean | Deletes all the registered intents and entities when starting the bot. This option allows to easily (re)-deploy bots under development, but also triggers a full re-training of the underlying agent each time the bot is started. | Optional (default false ) |
xatkit.dialogflow.intent.loading |
Boolean | Allows to disable intent loading from the DialogFlow agent. This option is used to reduce the number of queries sent to the DialogFlow API when running Jarvis tests. Warning: disabling intent loading can create consistency issues between the DialogFlow agent and the Jarvis runtime and should not be used in production. Note: this option is automatically set to false if jarvis.dialogflow.clean_on_startup is true . |
Optional (default true ) |
xatkit.dialogflow.entity.loading |
Boolean | Allows to disable entity loading from the DialogFlow agent. This option is used to reduce the number of queries sent to the DialogFlow API when running Jarvis tests. Warning: disabling entity loading can create consistency issues between the DialogFlow agent and the Jarvis runtime and should be not used in production. Note: this option is automatically set to false if jarvis.dialogflow.clean_on_startup is true . |
Optional (default true ) |
xatkit.dialogflow.followup.lifespan |
Integer | Allows to change the default lifespan used for followup intent's out contexts | Optional (default 2 ) |
xatkit.dialogflow.confidence.threshold |
Float | The confidence threshold used to accept/reject recognized intent based on their confidence score. Note: intent containing any entities cannot be rejected based on the confidence threshold (these intents typically have low confidence scores) |
Optional (default 0 : accept all intents) |
You can specify Xatkit options as command line arguments, which may be interesting if you want to start multiple versions of the same bot, or to ease the configuration of a Docker image containing your bot.
The syntax for command line arguments is as follows: -D<option key>=<option value>
, as an example, the snippet below will start MyBot.jar on the port 5010 (instead of the default 5000).
java -Dxatkit.server.port=5010 -jar MyBot.jar
Note that command line arguments can be used for any Xatkit option, including DialogFlow and platform-specific options. Multiple options can be provided with the following syntax:
java -D<option1>=<value1> -D<option2>=<value2> [...] -jar MyBot.jar
⚠ Command line arguments override the Configuration content.
- Getting Started
- Configuring your bot
- Integrating an Intent Recognition Provider
- Adding a bot to your website
- Deploying on Slack
- Basic concepts
- Intents and Entities
- States, Transitions, and Context
- Default and Local Fallbacks
- Core Library