Updating conversation analysis¶
-
PUT
/nlu/v1/agents/{agent_id}/conversation_analysis
Updates agent conversation analysis configuration {agent_id}.
Sample Input
{ "schema_version": "1.0", "pipeline": "pt-br/conversation-1.0", "intents": [ { "name": "Depositar", "description": "Depositar", "sentence_examples": [ { "text": "quero colocar dinheiro na minha conta" }, { "text": "vou fazer um depósito" }, { "text": "tenho um depósito para fazer" }, { "text": "depositar dinheiro na minha conta" }, { "text": "gostaria de depositar R$10,00 em minha conta corrente" } ] }, { "name": "Sacar", "description": "Sacar", "sentence_examples": [ { "text": "quero tirar dinheiro da minha conta" }, { "text": "vou fazer um saque" }, { "text": "tenho um saque para fazer" }, { "text": "sacar dinheiro da minha conta" }, { "text": "gostaria de sacar R$10,00 em minha conta corrente" } ] }, { "name": "Pagar", "description": "Pagar", "sentence_examples": [ { "text": "tenho uma conta para pagar" }, { "text": "quero pagar uma fatura" }, { "text": "quero fazer um pagamento" }, { "text": "realizar um pagamento" }, { "text": "tenho uma conta de R$100,00 para pagar" } ] } ], "system_entities": [ "sys.currency", "sys.number" ], "custom_entities": [ { "name": "PHONE_NUMBER", "synonym_values": [ { "value": "casa", "synonyms": [ "telefone de casa", "minha casa" ] } ], "regex_values": [ { "value": "\\1\\2", "regex": "(\\d{2})\\-(\\d{9})" } ] }, { "name": "CEP", "regex_values": [ { "value": "@text", "regex": "(\\d{5})-(\\d{3})" } ] }, { "name": "produtos", "synonym_values": [ { "value": "Tv", "synonyms": [ "TV", "televisão" ] } ] } ] }
Sample Response
{ "msg": "OK" }
- Parameters
agent_id – Agent ID
- Request JSON Object
schema_version (string) – Used version.
pipeline (string) – Type of pipeline used.
intents (List[Intent]) – List of registered intents.
unknown_intent (Dict[UnknownIntent]) – Settings for unknown intents.
system_entities (List[string]) – List of registered system entities.
custom_entities (List[CustomEntity]) – List of registered custom entities.
- Status Codes
201 Created – Success
404 Not Found – Agent not found
422 Unprocessable Entity – Unprocessed request
500 Internal Server Error – Internal Error
- Response JSON Object
msg (string) – OK.
REQUEST DETAILS
Intent Object
- Request JSON Object
name (string) – Intent name.
description (string) – Intent description.
sentence_examples (List[Sentence]) – List of example sentences.
Unknown Intent Object
- Request JSON Object
enabled (boolean) – Enable unknown intent detection feature.
autodetect_enabled (boolean) – Enable automatic detection of unknown intent.
auto_unkclass_enabled (boolean) – Enable automatic generation of out-of-domain sentences.
score_threshold (float) – Minimum score for intent prediction to be valid.
sentence_examples (List[Sentence]) – List of example sentences for unknown intent.
Sentence Object
- Request JSON Object
text (string) – Sample sentence.
Custom Entity Object
- Request JSON Object
name (string) – Entity name.
synonym_values (List[Synonym]) – List of values and synonyms.
regex_values (List[Regex]) – List of values and regex.
Synonym Object
- Request JSON Object
value (string) – Value of the expression.
synonyms (List[string]) – List of synonyms for the value.
Regex Object
- Request JSON Object
value (string) – Value of the expression.
regex (string) – Regex to be used to match the expression.