Importing intents
note
This section is about programmatically importing intent data from custom applications. If you are looking to automate your workflows, our command line tool allow importing and exporting intents in various formats and can be easily added to custom scripts and continuous integration pipelines.
#
Request#
EndpointPart | Value |
---|---|
URL | https://api.humanfirst.ai/v1alpha1/workspaces/<NAMESPACE>/<WORKSPACE_ID>/intents/import_http |
Method | POST |
Body | Multi-part form data |
Note: To find your namespace and the workspace id, see this.
#
Request bodyThe body is in multi-part form data with the following fields:
Field | Type | Description |
---|---|---|
format | string | The format of the exported data. See Data format |
file | bytes | The data to import. |
request | ImportIntentsRequest | Optional request object to define more options. See the API Reference. |
#
Data formatSpecifies the format in which the intent data is going to be converted before exporting.
Numeric format | String format | Description |
---|---|---|
1 | INTENTS_FORMAT_CSV_SIMPLE_INTENTS | Two-column csv formatted as text,intent_name - fields delimited by "" |
2 | INTENTS_FORMAT_RASA_MARKDOWN | Rasa 1.0 NLU format |
3 | INTENTS_FORMAT_RASA_YAML | Rasa 2.0 NLU format |
5 | INTENTS_FORMAT_DIALOGFLOW_ES_AGENT | Dialogflow agent export format |
7 | INTENTS_FORMAT_HF_JSON | HumanFirst JSON format |
8 | INTENTS_FORMAT_COGNIGY_JSON | Cognigy intents JSON format |
#
Curl examplenote
In the following example, the hf
command line tool is used to fetch a valid access token.
See how to install and configure it here.
To import intents into a workspace using our JSON format, use the following curl command: