Rasa

Configure your Rasa application to talk to a Jargon content server
Add the following section to the “endpoints.yml” file for your application, replacing the content surrounded by “<>”
nlg:
url: <content server URL>
headers:
x-jargon-project: <Jargon project ID>
x-jargon-contentinterface: <Jargon content interface ID>
x-jargon-locale: <locale>
x-jargon-tag: <tag>

Content server URLs
Choose the location that’s closest to where your application is running. Please contact support@jargon.com if you’d like us to add other locations.

  • Virginia, USA: https://cs-aws-us-east-1.jargoncontent.net/rasa/nlg
  • Dublin, Ireland: https://cs-aws-eu-west-1.jargoncontent.net/rasa/nlg
  • Tokyo, Japan: https://cs-aws-ap-northeast-1.jargoncontent.net/rasa/nlg

Deployment values
You can find the Project ID and Content Interface ID in the details for your deployed release. The tag value must match one of the tags associated with the release. The locale value must match one of the locales included in the release.

Example configuration
nlg:
url: https://cs-aws-us-east-1.jargoncontent.net/rasa/nlg
headers:
x-jargon-project: JP12345
x-jargon-contentinterface: JI12345
x-jargon-locale: en-US
x-jargon-tag: production

Launch your Rasa application
When launching your Rasa application (via “rasa run” or “rasa shell”) you’ll need include the following arguments:
--enable-api --endpoints endpoints.yml

Without these arguments Rasa core won’t use the configuration to talk to Jargon’s content servers.


Amazon Alexa, Google Assistant, and Jovo

Use the Jargon SDK to connect your app to Jargon
For apps built natively on Amazon Alexa, Google Assistant, or Jovo, the Jargon Platform SDK makes it easy for an app to access the content authored in the Jargon Platform. It allows your app to obtain fully constructed, multi-component content (via responses), along with individual content items (resources).

Architecture
The Jargon Platform SDK is built in a layered approach. At the lowest level is the Platform SDK core. The Platform SDK core is responsible for loading content from the file system or Jargon's content distribution servers (depending on how your application is configured), locating individual content items, and rendering content into its final form, taking into account the data passed in from the application.

Above the Platform SDK core are adapters for voice application frameworks, such as the Alexa Skill Kit for Node.js. The platform specific adapters provide easy integration with the underlying framework, and handle the details of managing the lower-level structures for each request (including, among other things, determining the locale to use) and routing Jargon content into the correct location of the framework response object.

Incorporating runtime data into content
Jargon-managed content can contain variables; at runtime the Jargon Platform SDK uses information from your voice application to render the final content. The values that your application provides for variables are called parameters in the SDK interfaces and documentation.

Within your content, you can control the process of rendering variables using ICU Message Format constructs. Beyond simple substitution, ICU Message Format helps you to author content that's grammatically correct when dealing with such things as pluralization, gender, or formality.

Named variables
This example expects a string variable: name.
"Hello {name}"

Plural forms
This example expects a numerical variable: count.
"{count, plural, =0 {You have zero items} =1 {You have one item} other {You have # items}}."
The 'other' case (used when count is neither 0 nor 1) inserts the value of count at '#'."

Gendered forms
This example expects a string variable: gender.
"{gender, select, female {She did it!} male {He did it!} other {It did it!}}"

Cross-references
A cross-reference allows a piece of content to incorporate a different piece of content. Cross references are denoted via one of the following formats:

  • Cross-reference to a string item: [string:<key>]
  • Cross-reference to a specific variant of a string item: [string:<key>:<variant>]
  • Cross-reference to a specific variant and component of a response item: [response:<key>:<variant>:<component>]

For a response, the component must refer to a string component, such as "speech" or "reprompt".

File Structure
All Jargon Platform SDK files are in JSON format. The structure of the JSON files are described below using Typescript syntax. All files live in a single file system directory, referred to as the resource directory. The default location for the resource directory is ./resources (relative to the working directory of the hosting application). You can configure the Platform SDK to use a different directory via an initialization option. The resource directory must contain a file named jargon-manifest.json.

For more information on the Jargon SDK file structure, access the developer documentation.

Platform SDK Core
The Platform SDK Core package (@jargon/platform-sdk-core) is the foundation of the Jargon Platform SDK. It contains the base functionality for loading and accessing content, variant selection, and content rendering.

For more information on installation and configuration of the Platform SDK Core, access the developer documentation.

Alexa Skills Kit Adapter
The Jargon Platform Alexa Skills Kit Adapter (@jargon/platform-alexa-skill-kit) integrates the Jargon Platform SDK with voice applications built on top of the Alexa Skills Kit SDK for Node.js framework.

For more information on installation and configuration of the Alexa Skills Kit Adapter, access the developer documentation.

Actions on Google Adapter
The Jargon Platform Actions on Google Adapter (@jargon/platform-actions-on-google) integrates the Jargon Platform SDK with voice applications built on top of the Actions on Google client library. Both Dialogflow and Actions SDK applications are supported.

For more information on installation and configuration of the Actions on Google Adapter, access the developer documentation.

Jovo Framework Adapter
The Jargon Platform Jovo Framework Adapter (@jargon/platform-jovo) integrates the Jargon Platform SDK with voice applications built on top of the Jovo Framework.

For more information on installation and configuration of the Jovo Adapter, access the developer documentation.