Uploading or downloading all actions
You can upload or download all your actions as a JSON file.
Downloading
To back up all your actions, download a JSON file and store it.
-
On the Actions page, click Global settings .
-
On the Upload/Download tab, click the Download button.
Uploading
To reinstate a backup copy of actions that you exported from another service instance or environment, import the JSON file of the actions you exported.
If the watsonx Assistant service changes between the time you export the actions and import it, due to functional updates that are regularly applied to instances in cloud-hosted continuous delivery environments, your imported actions might function differently than before.
-
On the Actions page, click Global settings .
-
On the Upload/Download tab, drag and drop a JSON file onto the tab or click to select a file from your local system, then click Upload.
The imported JSON file must use UTF-8 encoding, without byte order mark (BOM) encoding. The JSON file cannot contain tabs, newlines, or carriage returns.
Uploading intents as actions
If you created intents in the classic experience, you can migrate your intents to actions. When you upload intents, each intent is created as a new action. All phrases corresponding to an intent are created as example phrases for the new action. This can provide a helpful starting point when you are ready to start building actions.
-
Download the intents that you want to migrate to actions from the classic experience. For more information, see Downloading intents. The format for each line in the file is as follows:
<phrase>,<intent>
where
<phrase>
is the text of a user example phrase, and<intent>
is the name of the intent. For example:Tell me the current weather conditions.,weather_conditions Is it raining?,weather_conditions What's the temperature?,weather_conditions Where is your nearest location?,find_location Do you have a store in Raleigh?,find_location
-
From the main actions page, click the Upload icon .
-
Select the intents file that you downloaded.
The file is validated and uploaded, and the system trains itself on the new data.
The intents in column 2 are created as new actions, and the phrases in column 1 are created as example phrases for the corresponding action. For example, if you upload the example from step 1, two new actions are created for the
weather_conditions
andfind_location
intents. The underscores (_
) in the intent names are replaced with spaces, for example, theweather_conditions
intent becomes theweather conditions
action.In this example, the
weather_conditions
action will have three example phrases:Tell me the current weather conditions.
,Is it raining?
, andWhat's the temperature?
. Thefind_location
action will have two example phrases:Where is your nearest location?
andDo you have a store in Raleigh?
.