Skip to content

Commit

Permalink
updated some copyrights and added dialog method doc
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-miller committed Jan 4, 2021
1 parent 2778035 commit d06aa6d
Show file tree
Hide file tree
Showing 21 changed files with 184 additions and 137 deletions.
4 changes: 2 additions & 2 deletions access-control.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

copyright:
years: 2020
lastupdated: "2020-12-14"
years: 2020, 2021
lastupdated: "2021-01-04"

subcollection: assistant

Expand Down
4 changes: 2 additions & 2 deletions accessibility.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

copyright:
years: 2015, 2020
lastupdated: "2020-09-15"
years: 2015, 2021
lastupdated: "2021-01-04"

subcollection: assistant

Expand Down
2 changes: 1 addition & 1 deletion actions-overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2020
years: 2020, 2021
lastupdated: "2020-10-27"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion actions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2020
years: 2020, 2021
lastupdated: "2020-12-15"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-client.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-08-19"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-context.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-08-20"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-dialog-modify.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-03-12"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-dialog-responses.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-08-19"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-methods.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-08-19"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-migration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-08-19"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion api-overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2015, 2020
years: 2015, 2021
lastupdated: "2020-03-12"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion assistant-add.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2018, 2020
years: 2018, 2021
lastupdated: "2020-11-17"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion assistant-settings.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2018, 2020
years: 2018, 2021
lastupdated: "2020-12-04"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion assistants.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2018, 2020
years: 2018, 2021
lastupdated: "2020-07-21"

subcollection: assistant
Expand Down
2 changes: 1 addition & 1 deletion at-events.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

copyright:
years: 2020
years: 2020, 2021
lastupdated: "2020-08-17"

subcollection: assistant
Expand Down
6 changes: 3 additions & 3 deletions autolearn.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

copyright:
years: 2020
lastupdated: "2020-12-04"
years: 2020, 2021
lastupdated: "2021-01-04"

subcollection: assistant

Expand All @@ -24,7 +24,7 @@ subcollection: assistant
{:python: .ph data-hd-programlang='python'}
{:swift: .ph data-hd-programlang='swift'}

# Empower your skill to learn automatically ![Beta](images/beta.png)
# Enable your skill to improve itself with autolearning ![Beta](images/beta.png)
{: #autolearn}

Use autolearning to enable your skill to learn from interactions between your customers and your assistants.
Expand Down
8 changes: 4 additions & 4 deletions commands-voice.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

copyright:
years: 2015, 2020
lastupdated: "2020-10-09"
years: 2015, 2021
lastupdated: "2021-01-04"

subcollection: assistant

Expand Down Expand Up @@ -57,8 +57,8 @@ Each action consists of a `command` property, followed by an optional `parameter
| `vgwActPauseSTT` | Pauses speech-to-text processing until it's reenabled by the `vgwActUnPauseSTT` action. If recording is enabled and speech-to-text processing is paused, the audio from the caller isn't captured. | `participants`: For SIPREC sessions, a comma-separated list of participants that the action is applied to. If the `participants` list isn't provided, the action is applied to all participants or SIPREC streams.|
| `vgwActSendSIPInfo`| Send UUI data in a SIP INFO request. | <ul><li>`sipHeaders`: A paired list of SIP Header names and values, which is added to the SIP INFO request in `name/value` format. The list can't contain the system header fields such as `From`, `To`, or `Contact`. Well-known header fields must be provided in the correct format to avoid parsing issues. Malformed headers can't be added to the message.</li><li>`messageBody`: Optional. A body that is attached to the SIP INFO request. When present, a mandatory header, `Content-Type`, must be provided in the `sipHeaders` list. If `Content-Type` isn't included, a default value of `application/text` is inserted.</li></ul> |
| `vgwActSendSMS` | Enables the assistant to send an SMS message to the user. | <ul><li>`message`: An SMS message that is sent to the user. Required.</li><li>`mediaURL`: An array of publicly accessible URLs of the media to be sent to the user. Optional. </li><li>`userPhoneNumber`: The phone number to send an SMS message to. The format of the number must match the format of the number that is required by the SMS provider. If no value is provided, the voice caller's phone number from an incoming SIP INVITE request (from header) is used. Optional.</li></ul> |
| `vgwActSetDisambiguationConfig` | Applies configuration settings to the disambiguation list. | <ul><li>`prefixText`: the text that will be prepended to each choice that is displayed in the disambiguation list.</li><li>`matchWord`: An array of utterances. Used to match Speech to Text utterances to each choice in the list.</li><li>`disableSpeech`: Optionally set to `true` or `false` to indicate whether to disable speech recognition when disambiguation is triggered. The default value is `false`.</li><ul> |
| `vgwActSetOptionsConfig` | Applies configuration settings to the `options` response type. | <ul><li>`prefixText`: the text that will be prepended to each label in an `option` response.</li><li>`matchWord`: An array of utterances. Used to match Speech to Text utterances to each option in the list.</li><li>`disableSpeech`: Optionally set to `true` or `false` to indicate whether to disable speech recognition when the `option` response type is triggered. The default value is `false`.</li><ul> |
| `vgwActSetDisambiguationConfig` | Applies configuration settings to the disambiguation list. | <ul><li>`prefixText`: the text that will be prepended to each choice that is displayed in the disambiguation list.</li><li>`matchWord`: An array of utterances. Used to match Speech to Text utterances to each choice in the list.</li><li>`disableSpeech`: Optionally set to `true` or `false` to indicate whether to disable speech recognition when disambiguation is triggered. The default value is `false`.</li></ul> |
| `vgwActSetOptionsConfig` | Applies configuration settings to the `options` response type. | <ul><li>`prefixText`: the text that will be prepended to each label in an `option` response.</li><li>`matchWord`: An array of utterances. Used to match Speech to Text utterances to each option in the list.</li><li>`disableSpeech`: Optionally set to `true` or `false` to indicate whether to disable speech recognition when the `option` response type is triggered. The default value is `false`.</li></ul> |
| `vgwActSetSTTConfig` | Applies a set of parameters for the phone integration to pass to the {{site.data.keyword.speechtotextshort}} service. {{site.data.keyword.conversationshort}} dynamically defines the parameters based on the call. | Parameters are transparently passed as JSON properties to the {{site.data.keyword.speechtotextshort}} service.<br/><ul><li>`config`: Parameters for the {{site.data.keyword.speechtotextshort}} service when using narrowband audio, such as:<ul><li>`model`: Specifies the language model to use, such as `en-US_NarrowbandModel`.</li><li>`profanity_filter`: Specifies whether to filter out curse words. The options are `true` or `false`.</li><li>`smart_formatting`: Specifies whether to apply formatting rules that direct the service to convert strings such as dates and times into more conventional representations, so they are easier to understand. The options are `true` or `false`.</li><li>`customization_id`: Specifies the ID of a custom language model to apply, such as `81d3630-ba58-11e7-aa4b-41bcd3f6f24d`.</li><li>`acoustic-customization_id`: Specifies the ID of a custom acoustic model to apply, such as `e4766090-ba51-11e7-be33-99bd3ac8fa93`.</li></ul>.</li><li>`broadbandConfig`: Parameters for the {{site.data.keyword.speechtotextshort}} service when broadband audio is enabled. Required only when `bandPreference` is set to `broadband`. At minimum, the language model must be defined on the `model` property.</li><li>`bandPreference`: Defines which audio band to prefer when negotiating audio codecs in the session. Set to `broadband` to use broadband audio when possible. The default value is `narrowband`.</li><li>`confidenceScoreThreshold`: Confidence threshold of messages from the {{site.data.keyword.speechtotextshort}} service. Messages with a confidence score that are under the threshold are not sent to the assistat. The default value of 0 means that all responses are used. The recommended values are between 0 and 1.</li><li>`echoSuppression`: Indicates whether to suppress results from {{site.data.keyword.speechtotextshort}} that might occur from an echo of {{site.data.keyword.texttospeechshort}} synthesis.</li><li>`bargeInResume`: Set to true to resume playing back audio after barge-in if the confidence score of the final utterance is lower than the threshold specified by the confidenceScoreThreshold property.</li><li>`connectionTimeout`: Time in seconds that the integration waits to establish a socket connection with the {{site.data.keyword.speechtotextshort}} service. If the time is exceeded, the integration attempts to connect with the {{site.data.keyword.speechtotextshort}} service again. If the service still can't be reached, the call fails.</li><li>`requestTimeout`: Time in seconds that the integration waits to establish a speech recognition session with the {{site.data.keyword.speechtotextshort}} service. If the time is exceeded, the integration attempts to connect with the {{site.data.keyword.speechtotextshort}} service again. If the service still can't be reached, the call fails.</li><li>`updateMethod`: Optional. Specifies the update strategy to choose when setting the speech configuration. Possible values are `replace`, `replaceOnce`, `merge`, or `mergeOnce`.</li></ul> |
| `vgwActSetTTSConfig` | Applies a set of parameters for the phone integration to pass to the {{site.data.keyword.texttospeechshort}} service. {{site.data.keyword.conversationshort}} dynamically defines the parameters based on the call. | Parameters are passed as JSON properties to the {{site.data.keyword.texttospeechshort}} service. <br/><ul><li>`config`: Parameters for the {{site.data.keyword.texttospeechshort}} service, such as:<ul><li>`voice`: Specifies the voice model to use, such as `es-ES_LauraVoice`.</li></ul></li><li>`jitterBufferDelay`: The amount of time in milliseconds to buffer before playing back audio from the {{site.data.keyword.texttospeechshort}} service. This buffer accounts for any jitter in the streaming audio.</li><li>`connectionTimeout`: Time in seconds that the integration waits to establish a socket connection with the {{site.data.keyword.texttospeechshort}} service. If the time is exceeded, the integration attempts to connect with the {{site.data.keyword.texttospeechshort}} service again. If the service still can't be reached, the call fails.</li><li>`requestTimeout`: Time in seconds that the integration waits to establish a speech synthesis session with the {{site.data.keyword.texttospeechshort}} service. If the time is exceeded, the integration attempts to connect with the {{site.data.keyword.texttospeechshort}} service again. If the service still can't be reached, the call fails.</li><li>`cacheTimeToLive`: The time in hours to cache responses from the {{site.data.keyword.texttospeechshort}} service to improve playback response time. When enabled, all {{site.data.keyword.texttospeechshort}} responses are cached unless they are excluded in the dialog.</li><li>`updateMethod`: Optional. Specifies the update strategy to choose when setting the speech configuration. Possible values are `replace`, `replaceOnce`, `merge`, or `mergeOnce`.</li></ul> |
| `vgwActTransfer` | Transfers the call to the defined transfer target. | <ul><li>`acceptTransferRejectCodes`: A comma-separated list of the error codes that are treated as a successful response when the phone integration processes NOTIFY requests during a call transfer. </li><li>`transferHeader`: A custom header field that is added to the SIP REFER request.</li><li>`transferHeaders`: A list of custom header field name and value pairs to be added to a transfer request. For example:<p><code>{<br>"Custom-Header1": "123",<br>"Custom-Header2": "456"<br>}</code></p></li><li>`transferHeaderVal`: The value of the custom header field that you defined on the `transferHeader` parameter. </li><li>`transferMethod`: The value that specifies how to perform a call transfer. The call transfer can be defined in one of two ways: <ul><li>Default: `REFER`</li> <li>`HANGUP`: instead of referring the call, the phone integration plays back any associated text and then hangs up the call by sending a BYE request.</li></ul> </li><li>`transferTarget`: The SIP or telephone URI to transfer the call to, such as `sip:12345556789\\@myhost.com` or `tel:+18883334444` <p>**Note:** When you define SIP URIs in the {{site.data.keyword.conversationshort}} service, the `@` character must be escaped with backslashes as shown.</p></li><li>`transferTargetHeader`: Specifies which header field in a SIP BYE request to use in transfer target. By default, this parameter is defined as `Transfer-Target`, or the header field specified in the `vgwTransferTargetHeader` state variable. </li><li>`uuiData`: User-to-User Information (UUI) data to send. </li><li>`uuiSendMethod`: The method by which the UUI data is sent. The following values are supported: <ul><li>`uuiHeader`: Sends UUI data in a `User-to-User` header field. Default.</li><li>`contactHeader`: Sends UUI data in a `Contact` header field.</li><li>`referToURL`: Sends UUI data in a `Refer-To` header field.</li></ul>If data is sent in a `Contact` or `Refer-To` header field, the data is encoded as a URI header. If the `Refer-To` header value is a `tel` URL, the UUI data is sent as a URL parameter.</li></ul> If a parameter isn't specified, the phone integration uses the values of the following respective state variables, if defined: <ul><li>`vgwTransferHeader`</li><li>`vgwTransferHeaderVal`</li><li>`vgwTransferTarget`</li></ul> |
Expand Down
110 changes: 107 additions & 3 deletions dialog-methods.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---

copyright:
years: 2015, 2020
lastupdated: "2020-08-17"
years: 2015, 2021
lastupdated: "2021-01-04"

subcollection: assistant

Expand Down Expand Up @@ -85,6 +85,45 @@ The following sections describe methods you can use to process values. They are

You cannot use these methods to check for a value in an array in a node condition or response condition within the same node in which you set the array values.

### JSONArray.addAll(object)
{: #dialog-methods-arrays-addall}

This method appends one array to another.

For this dialog runtime context:

```json
{
"context": {
"toppings_array": ["onion", "olives"],
"more_toppings": ["mushroom","pepperoni"]
}
}
```
{: codeblock}

Make this update:

```json
{
"context": {
"toppings_array": "<? $toppings_array.addAll($more_toppings) ?>"
}
}
```
{: codeblock}

Result: The method itself returns null. However, the first array is updated to include the values from the second array.

```json
{
"context": {
"toppings_array": ["onion", "olives", "mushroom", "pepperoni"]
}
}
```
{: codeblock}

### JSONArray.append(object)
{: #dialog-methods-arrays-append}

Expand Down Expand Up @@ -164,7 +203,32 @@ $toppings_array.contains('ham')
```
{: codeblock}

Result: `True` because the array contains the element ham.
Result: `true` because the array contains the element `ham`.

### JSONArray.containsIgnoreCase(Object value)
{: #dialog-methods-arrays-contains-ignore-case}

This method returns true if the input JSONArray contains the input value regardless of whether the strings are in uppercase or lowercase.

For this Dialog runtime context which is set by a previous node or external application:

```json
{
"context": {
"toppings_array": ["onion", "olives", "ham"]
}
}
```
{: codeblock}

Dialog node or response condition:

```json
$toppings_array.containsIgnoreCase('HAM')
```
{: codeblock}

Result: `true` because the array contains the element `ham` and the case is ignored.

### JSONArray.containsIntent(String intent_name, Double min_score, [Integer top_n])
{: #dialog-methods-arrays-containsIntent}
Expand Down Expand Up @@ -1815,6 +1879,46 @@ This syntax:

Results: The condition is `true`.

### String.equals(String)
{: #dialog-methods-strings-equals}

This method returns true if the specified string equals the input string exactly.

Input: "Yes"

This syntax:

```json
{
"conditions": "input.text.equals('Yes')"
}
```
{: codeblock}

Results: The condition is `true`.

If the input is `Yes.`, then the result is `false` because the user included a period and the expression expects only the exact text, `Yes` without any punctuation.

### String.equalsIgnoreCase(String)
{: #dialog-methods-strings-equals-ignore-case}

This method returns true if the specified string equals the input string regardless of whether the case of the letters match.

Input: "yes"

This syntax:

```json
{
"conditions": "input.text.equalsIgnoreCase('Yes')"
}
```
{: codeblock}

Results: The condition is `true`.

If the input is `Yes.`, then the result is `false` because the user included a period and the expression expects only the text, `Yes`, in uppercase or lowercase letters without any punctuation.

### String.extract(String regexp, Integer groupIndex)
{: #dialog-methods-strings-extract}

Expand Down
Loading

0 comments on commit d06aa6d

Please sign in to comment.