Say
Easily speak to your carter agent
You can speak to your carter agent using Carter.say()
. Carter.say()
returns a CarterInteraction
.
say()
takes in your message and an options object. The options object can contain a:
uuid: a unique user user ID. Carter supports unique users and is capable of learning and recognising individual users. If you do not provide a uuid,
carter-js
will create one for you using thev1
method from the uuid package. This is returned in the response object for you to take note of if needed.scene: Carter can use scenes to dictate certain elements of it's functions - namely setting conditions on triggers. If you do not pass a scene then it will be undefined as this is not a required paramater for the CarterAPI endpoint.
Carter interactions are discussed more in the next section, however please be aware that if Carter does not return a valid response then the data
property of the interaction will be undefined, make sure to check for this either by checking the property itself or through the ok
property before you try to access it.
Last updated