ImportIntentsHttp

Imports intents into a workspace using a multipart request.

Path Parameters
namespace string โ€” REQUIRED

Namespace of the workspace.

playbook_id string โ€” REQUIRED

Unique identifier of the workspace.

Request body โ€” REQUIRED
file binary[]

(multi-part) content of the file in specified format

format string

(multi-part) format of the file. Possible formats:

  • INTENTS_FORMAT_CSV_SIMPLE_INTENTS
  • INTENTS_FORMAT_RASA_MARKDOWN
  • INTENTS_FORMAT_RASA_YAML
  • INTENTS_FORMAT_DIALOGFLOW_ES_AGENT
  • INTENTS_FORMAT_TXT_PHRASES
  • INTENTS_FORMAT_HF_JSON
  • INTENTS_FORMAT_COGNIGY_JSON

request ImportIntentsRequest
namespace string

Namespace of the workspace.

playbook_id string

Unique identifier of the workspace.

format enum

Format of the imported file. Values: 1 = CSV 2 = Rasa 1 Markdown 3 = Rasa 2 YAML 4 = Botpress 6 = Dialogflow ES 7 = Humanfirst JSON

format_options IntentsDataOptions
hierarchical_intent_name_disabled boolean

Disables intents hierarchy encoding via the intent names. Ex: 'Parent / Sub-parent / Intent'

hierarchical_delimiter string

Overrides the default delimiter used for intent hierarchy. Default is '--' for Botpress and Dialogflow, '+' for Rasa, '/' for CSV

zip_encoding boolean

Indicates that the intents are zipped and may be splits in different files.

gzip_encoding boolean

Indicates that the intent file is gzipped.

hierarchical_follow_up boolean

To be used with Dialogflow to use intents hierarchy using intents follow-up.

include_negative_phrases boolean

Export negative phrases as well.

intent_tag_predicate TagPredicate
require_ids string[]

Only include objects with ALL of the given tag ids.

include_ids string[]

Only include objects with ANY of the given tag ids.

exclude_ids string[]

Exclude objects with ANY of the given tag ids.

phrase_tag_predicate TagPredicate
require_ids string[]

Only include objects with ALL of the given tag ids.

include_ids string[]

Only include objects with ANY of the given tag ids.

exclude_ids string[]

Exclude objects with ANY of the given tag ids.

skip_empty_intents boolean

Skip all intents that do not contain phrases.

import_options ImportOptions
clear_intents boolean

Clears workspace intents before importing.

clear_entities boolean

Clears workspace entities before importing.

clear_tags boolean

Clears workspace tags before importing. Note: should not be used in combination with extra_intent_tags or extra_phrase_tags since we will clear potentially referenced tags.

merge_intents boolean

Tries to merge intents into existing ones if they can be found in the workspace.

merge_entities boolean

Tries to merge entities into existing ones if they can be found in the workspace.

merge_tags boolean

Tries to merge tags into existing ones if they can be found in the workspace.

extra_intent_tags TagReference[]

Add extra tags to imported intents.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

extra_phrase_tags TagReference[]

Add extra tags to imported phrases.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

override_metadata boolean

Overrides the description, color, and metadata of the workspace with the values of the imported file if they are supported in the received format. Supported formats: INTENTS_FORMAT_HF_JSON

override_name boolean

Overrides the name of the workspace with the value of the imported file if they are supported in the received format. Supported formats: INTENTS_FORMAT_HF_JSON

data bytes

Bytes of the file to import. The format is the one requested through the format field in request.

clear_workspace boolean

Clears workspace intents, entities & tags before importing. Deprecated: use import_options

clear_intents boolean

Clears workspace intents before importing. Deprecated: use import_options

clear_entities boolean

Clears workspace entities before importing. Deprecated: use import_options

clear_tags boolean

Clears workspace tags before importing. Note: should not be used in combination with extra_intent_tags or extra_phrase_tags since we will clear potentially referenced tags. Deprecated: use import_options

merge_intents boolean

Tries to merge intents into existing ones if they can be found in the workspace. Deprecated: use import_options

merge_entities boolean

Tries to merge entities into existing ones if they can be found in the workspace. Deprecated: use import_options

merge_tags boolean

Tries to merge tags into existing ones if they can be found in the workspace. Deprecated: use import_options

soft_fail boolean

Returns fatal problems via the problems field instead of gRPC errors. Temporary flag until front-end properly handles soft failures instead of gRPC error.

extra_intent_tags TagReference[]

Add extra tags to imported intents. Deprecated: use import_options

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

extra_phrase_tags TagReference[]

Add extra tags to imported phrases. Deprecated: use import_options

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

Response Body
imported_intent_count uint32

Number of intents that were imported.

imported_training_phrase_count uint32

Number of training phrases that were imported.

problems ValidationProblem[]

List of problems that occurred while validating the file format. This list may not be exhaustive. If it's been limited, the total_problems indicate the total count.

level enum

Level of the problem. 1 = Warning 2 = Fatal

message string

Message of the problem.

filename string

(Optional) Filename in which the problem was encountered.

line uint32

(Optional) Line of filename on which the problem was encountered.

training_phrase TrainingPhrase
id string

Unique identifier

translated_from_id string

If this training phrase is a translation of an original training phrase, ID of the TrainingPhrase from which this training phrase was translated from.

text string

Verbatim text. In case of a fragment, copies the first user input

processed boolean

Whether this fragment has been been seen in the bottom-up response creation flow

constituents string[]

The divided sentences/constituents order to support multi-part.

locations PhraseLocation[]

Editing a training phrase appends new locations.

conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

fragment Fragment
items FragmentItem[]

Array of inputs/placeholders found in this fragment

input Input
text string

The verbatim input text

source enum

Whether the input comes from an expert or user

input_id string

The normalized input / example id from the pipeline

created_at RFC3339

The absolute timestamp when the input was uttered

placeholder Placeholder
tag_id string

The tag identifier representing the type of agent response that would be created at this location. See zia.ai.Playbook.Tag.id

location PhraseLocation
conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

metadata TrainingPhraseMetadata
metadata MetadataEntry
key string
value string
entities InputEntity[]

Entities referenced in the training phrase text. If the parts field is provided on creation or update, this field is ignored and rebuilt from parts.

reference EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

span SpanIndex
start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

parts InputPart[]

If the training phrase contains entities, this field contains the parts of the text and the entities. The parts are concatenated to form the final text. Parts are provided to ease entity annotations. If provided at creation or update, this will override the entities field.

text Text
text string
entity EntityMatch
entity EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

score float

The confidence score for this match

span Span
start uint32

The start of this entity, as the utf8 byte index

end uint32

The end of this entity, as the utf8 byte index

extractor string

(Rasa specific) Name of the pipeline component that found this entity

tags TagReference[]

Tags of the phrase.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

source enum

Source of the training phrase

source_info TrainingPhraseSourceInfo
source_id string

ID of the training phrase at its source (if applicable)

merged_ids string[]

List of unique identifiers of phrase from HumanFirst or external integrations that got merged into this phrase at some point and that can be reused to ease further merges. This list may not be exhaustive and could be truncated.

botpress Botpress
rasa Rasa
metadata MetadataEntry
key string
value string
dialogflow Dialogflow
repeat_count int32

For Dialogflow CX, this maps to the repeatCount field of training phrase that was sourced. For Dialogflow ES, this maps to the timesAddedCount field of the training phrase that was sourced, or thecount field in the usersays object that source via an ES Agent JSON Package.

created_at RFC3339

Date at which first the training phrase insert was done in database (generated by server)

updated_at RFC3339

Date at which last update to training phrase was done in database (generated by server)

deleted_at RFC3339

If present, the date at which the training phrase was deleted from the database (generated by server)

language string

Language of the training phrase. If empty, 'en' is assumed. 2 letters ISO 639-1 or BCP47 locale format (ex: 'en-US').

training_phrase_list string

If training phrase is stored in a database, list in which this phrase is.

hash string

Hash of the normalized text of the phrase, used to join embeddings data.

negative boolean

If the training phrase is associated to an intent, this indicates that it's a negative phrase

edited boolean

Whether this phrase's text prop has been modified from its original version

starred boolean
intent Intent

Intents define a component that match on some external input or condition. It's purpose is to activate it's outbound contexts whenever the condition is met

id string

UUID

name string

User-given name

type enum

Expert/User/Meta

parent_id string

The intent's parent intent, within the same context

template_intent TemplateIntentInfo
template_id string

Template from which this intent was imported

template_name string
template_intent_id string

intent id within the template

parent_names string[]

List of parents, from top to bottom

template_intent_name string

Original intent name, in the template

inbound_contexts Context[]

Contexts which have to be active in order for this intent to match

id string

UUID

type enum

The type of intents contained by this context

position uint32

The position occupied by the intent in the current context. (only populated when fetching intents)

created_at RFC3339
outbound_contexts Context[]

Contexts to activate if this intent is matched

id string

UUID

type enum

The type of intents contained by this context

position uint32

The position occupied by the intent in the current context. (only populated when fetching intents)

created_at RFC3339
training_phrases TrainingPhrase[]

Positive training phrases of the intent

id string

Unique identifier

translated_from_id string

If this training phrase is a translation of an original training phrase, ID of the TrainingPhrase from which this training phrase was translated from.

text string

Verbatim text. In case of a fragment, copies the first user input

processed boolean

Whether this fragment has been been seen in the bottom-up response creation flow

constituents string[]

The divided sentences/constituents order to support multi-part.

locations PhraseLocation[]

Editing a training phrase appends new locations.

conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

fragment Fragment
items FragmentItem[]

Array of inputs/placeholders found in this fragment

input Input
text string

The verbatim input text

source enum

Whether the input comes from an expert or user

input_id string

The normalized input / example id from the pipeline

created_at RFC3339

The absolute timestamp when the input was uttered

placeholder Placeholder
tag_id string

The tag identifier representing the type of agent response that would be created at this location. See zia.ai.Playbook.Tag.id

location PhraseLocation
conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

metadata TrainingPhraseMetadata
metadata MetadataEntry
key string
value string
entities InputEntity[]

Entities referenced in the training phrase text. If the parts field is provided on creation or update, this field is ignored and rebuilt from parts.

reference EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

span SpanIndex
start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

parts InputPart[]

If the training phrase contains entities, this field contains the parts of the text and the entities. The parts are concatenated to form the final text. Parts are provided to ease entity annotations. If provided at creation or update, this will override the entities field.

text Text
text string
entity EntityMatch
entity EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

score float

The confidence score for this match

span Span
start uint32

The start of this entity, as the utf8 byte index

end uint32

The end of this entity, as the utf8 byte index

extractor string

(Rasa specific) Name of the pipeline component that found this entity

tags TagReference[]

Tags of the phrase.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

source enum

Source of the training phrase

source_info TrainingPhraseSourceInfo
source_id string

ID of the training phrase at its source (if applicable)

merged_ids string[]

List of unique identifiers of phrase from HumanFirst or external integrations that got merged into this phrase at some point and that can be reused to ease further merges. This list may not be exhaustive and could be truncated.

botpress Botpress
rasa Rasa
metadata MetadataEntry
key string
value string
dialogflow Dialogflow
repeat_count int32

For Dialogflow CX, this maps to the repeatCount field of training phrase that was sourced. For Dialogflow ES, this maps to the timesAddedCount field of the training phrase that was sourced, or thecount field in the usersays object that source via an ES Agent JSON Package.

created_at RFC3339

Date at which first the training phrase insert was done in database (generated by server)

updated_at RFC3339

Date at which last update to training phrase was done in database (generated by server)

deleted_at RFC3339

If present, the date at which the training phrase was deleted from the database (generated by server)

language string

Language of the training phrase. If empty, 'en' is assumed. 2 letters ISO 639-1 or BCP47 locale format (ex: 'en-US').

training_phrase_list string

If training phrase is stored in a database, list in which this phrase is.

hash string

Hash of the normalized text of the phrase, used to join embeddings data.

negative boolean

If the training phrase is associated to an intent, this indicates that it's a negative phrase

edited boolean

Whether this phrase's text prop has been modified from its original version

starred boolean
negative_training_phrases TrainingPhrase[]

Negative training phrases of the intent

id string

Unique identifier

translated_from_id string

If this training phrase is a translation of an original training phrase, ID of the TrainingPhrase from which this training phrase was translated from.

text string

Verbatim text. In case of a fragment, copies the first user input

processed boolean

Whether this fragment has been been seen in the bottom-up response creation flow

constituents string[]

The divided sentences/constituents order to support multi-part.

locations PhraseLocation[]

Editing a training phrase appends new locations.

conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

fragment Fragment
items FragmentItem[]

Array of inputs/placeholders found in this fragment

input Input
text string

The verbatim input text

source enum

Whether the input comes from an expert or user

input_id string

The normalized input / example id from the pipeline

created_at RFC3339

The absolute timestamp when the input was uttered

placeholder Placeholder
tag_id string

The tag identifier representing the type of agent response that would be created at this location. See zia.ai.Playbook.Tag.id

location PhraseLocation
conversation_id string

The conversation / context which contains the given spans

input_id string

The normalized input / example id from the pipeline

conversation_type uint32

Type of conversation the phrase was found in. Numeric value of zia.ai.model.ConversationType

spans SpanIndex[]

The spans (conversation fragments) that represent this phrase. Multiple spans can be defined in the event where the relevant portions of text are separated.

start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

metadata TrainingPhraseMetadata
metadata MetadataEntry
key string
value string
entities InputEntity[]

Entities referenced in the training phrase text. If the parts field is provided on creation or update, this field is ignored and rebuilt from parts.

reference EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

span SpanIndex
start SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

end SpanPosition
input_index uint32

The index of the input the span refers to. This index is inclusive on both start and end positions. Ex: input 0 + input 1 => start=0, end=1

character_index uint32

The byte index of the input. This index is inclusive on the start position, and exclusive on the end position. Ex: hello world, span of 'hello' => start=0, end=5, span of 'world' => start=6, end=11 Caution: When using encoding in which multiple bytes may represent a single displayable character (e.g. UTF-8, emojis), the byte index should enclose all bytes that make up the displayable character.

parts InputPart[]

If the training phrase contains entities, this field contains the parts of the text and the entities. The parts are concatenated to form the final text. Parts are provided to ease entity annotations. If provided at creation or update, this will override the entities field.

text Text
text string
entity EntityMatch
entity EntityReference

Sync from zia.ai.playbook.EntityReference

entity_id string

Unique identifier of the entity for database storage.

key string

Key by which we can refer to this entity in the utterance. Ex (rasa): I'd like to visit [New York City](city) where city is the key

text string

Text used to reference the entity in the utterance Ex (rasa): I'd like to visit [New York City](city) where New York City is the text.

value string

If the reference text isn't the main entity value, this value points to the right key value to use. For example, for a city entity, if a synonym was used, this value would contain the key value it refers to in the entity. (rasa long): I went to NYC{"entity": "city", "value": "New York City"} where 'New York City' is the value (rasa short): I went to NYC(city:New York City)

value_id string

Unique identifier of the entity value for database storage.

role string

If entity has repeated usage in the utterance, assigns role for each usage Ex (rasa): I want to fly from Berlin{"entity": "city", "role": "departure"} to San Francisco{"entity": "city", "role": "destination"}.

score float

The confidence score for this match

span Span
start uint32

The start of this entity, as the utf8 byte index

end uint32

The end of this entity, as the utf8 byte index

extractor string

(Rasa specific) Name of the pipeline component that found this entity

tags TagReference[]

Tags of the phrase.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

source enum

Source of the training phrase

source_info TrainingPhraseSourceInfo
source_id string

ID of the training phrase at its source (if applicable)

merged_ids string[]

List of unique identifiers of phrase from HumanFirst or external integrations that got merged into this phrase at some point and that can be reused to ease further merges. This list may not be exhaustive and could be truncated.

botpress Botpress
rasa Rasa
metadata MetadataEntry
key string
value string
dialogflow Dialogflow
repeat_count int32

For Dialogflow CX, this maps to the repeatCount field of training phrase that was sourced. For Dialogflow ES, this maps to the timesAddedCount field of the training phrase that was sourced, or thecount field in the usersays object that source via an ES Agent JSON Package.

created_at RFC3339

Date at which first the training phrase insert was done in database (generated by server)

updated_at RFC3339

Date at which last update to training phrase was done in database (generated by server)

deleted_at RFC3339

If present, the date at which the training phrase was deleted from the database (generated by server)

language string

Language of the training phrase. If empty, 'en' is assumed. 2 letters ISO 639-1 or BCP47 locale format (ex: 'en-US').

training_phrase_list string

If training phrase is stored in a database, list in which this phrase is.

hash string

Hash of the normalized text of the phrase, used to join embeddings data.

negative boolean

If the training phrase is associated to an intent, this indicates that it's a negative phrase

edited boolean

Whether this phrase's text prop has been modified from its original version

starred boolean
training_phrase_list_id string

If the intent is from database, list identifier of training phrases

negative_training_phrase_list_id string

If the intent is from database, list identifier of negative training phrases

hidden_from_agents boolean

If true, the intent will not be visible to agents from the extension (defaults to false)

tags TagReference[]

Tags of the intent.

id string

Unique identifier of the tag.

name string

(Optional) Only used when importing data that tag IDs are not defined yet. This will not be filled when requesting tagged objects.

protected boolean

For internal use. There is no guarantee that this will be properly filled.

color string
hidden_from_follow_up_suggestions boolean

If true, this intent or its children won't be available within Answer's follow-up suggestions

follow_up_after_turn_count UInt32Value

Wrapper message for uint32. The JSON representation for UInt32Value is JSON number.

value uint32

The uint32 value.

follow_up_allow_repeat_after_turn_count UInt32Value

Wrapper message for uint32. The JSON representation for UInt32Value is JSON number.

value uint32

The uint32 value.

follow_up_implies_parent boolean
hidden_from_automate_matches boolean

If true, it will be considered by the classifier, but will never be returned as a match to a client

generic boolean

Generic intents are only used for its hierarchy, and are not expected to hold any responses

source IntentSourceInfo
source_id string

ID of the intent at its source.

merged_ids string[]

List of unique identifiers of intents from HumanFirst or external integrations that got merged into this intent at some point and that can be reused to ease further merges. This list may not be exhaustive and could be truncated.

botpress Botpress
rasa Rasa
metadata MetadataEntry
key string
value string
dialogflow Dialogflow
repeat_count int32

For Dialogflow CX, this maps to the repeatCount field of training phrase that was sourced. For Dialogflow ES, this maps to the timesAddedCount field of the training phrase that was sourced, or thecount field in the usersays object that source via an ES Agent JSON Package.

cognigy Cognigy
rules string[]

see etl/cognigy/objects.go

confirmation_sentences string[]
condition string
disambiguationSentence string
child_features boolean
entry_point string
is_reject_intent boolean
is_disabled boolean
override_intent_default_replies_as_examples string
out_of_scope boolean

If true, this intent will be used as a negative class when classifying if examples are in scope or not

metadata IntentMetadata
metadata MetadataEntry
key string
value string
description string

Description of the intent.

created_at RFC3339
updated_at RFC3339
deleted_at RFC3339
total_problems uint32

Indicates total number of problems at import.

background_operation Operation
namespace string

Namespace in which the operation was launched.

id string

Unique identifier of the operation.

done boolean

Indicates that the operation has completed. If error is set, the operation has failed. Otherwise, the operation has succeeded and result may be set if the operation has a response.

error Error
code uint32
message string
response Any

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON ==== The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field value which holds the custom JSON in addition to the @type field. Example (for message google.protobuf.Duration): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }

type_url string

A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: If no scheme is provided, https is assumed. An HTTP GET on the URL must yield a google.protobuf.Type value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.

value bytes

Must be a valid serialized protocol buffer of the above specified type.