Skip to main content

AddressIntentRequest

Stentor API Reference


Stentor API Reference / stentor-models/src / AddressIntentRequest

Interface: AddressIntentRequest

Defined in: packages/stentor-models/src/Request/AddressIntentRequest.ts:41

Request for a particular intent.

For Alexa see https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa#intentrequest

Extends​

Properties​

intentId​

intentId: string

Defined in: packages/stentor-models/src/Request/AddressIntentRequest.ts:45

An intent that can parse an address query

Overrides​

IntentRequest.intentId


slots​

slots: AddressIntentRequestSlotMap

Defined in: packages/stentor-models/src/Request/AddressIntentRequest.ts:49

The slots

Overrides​

IntentRequest.slots


type​

type: "INTENT_REQUEST"

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:95

The type of an intent request is always "INTENT_REQUEST"

Inherited from​

IntentRequest.type


sessionId​

sessionId: string

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:108

The ID of the user's current session.

A session is typically defined by the channel is on but it is typically a set of requests and responses that are linked together.

Inherited from​

IntentRequest.sessionId


matchConfidence?​

optional matchConfidence: number

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:120

Confidence level of the intent match. On a scale from 0-1 where 1 is the highest confidence of a match.

https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-concept-prediction-score https://cloud.google.com/dialogflow/es/docs/intents-matching#confidence

Inherited from​

IntentRequest.matchConfidence


activeContexts?​

optional activeContexts: ActiveContext[]

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:124

Current active contexts.

Inherited from​

IntentRequest.activeContexts


isBargeIn?​

optional isBargeIn: boolean

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:128

Is the request a barge-in, did the user interupt the assistants response.

Inherited from​

IntentRequest.isBargeIn


canFulfill?​

optional canFulfill: boolean

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:132

A meta, preliminary request that is more for understanding if the assistant can provide an answer or not.

Inherited from​

IntentRequest.canFulfill


data?​

optional data: Data

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:136

Optional data that can be added to the request

Inherited from​

IntentRequest.data


knowledgeAnswer?​

optional knowledgeAnswer: KnowledgeAnswer

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:143

Beta

A unique request provided by a question answering system.

Deprecated​

  • Will be removed in next major version. Use the newer knowledgeBaseResult which has more information.

Inherited from​

IntentRequest.knowledgeAnswer


knowledgeBaseResult?​

optional knowledgeBaseResult: KnowledgeBaseResult

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:149

Beta

Results returned from a knowledge base such as AWS Kendra.

Inherited from​

IntentRequest.knowledgeBaseResult


attachments?​

optional attachments: RequestAttachment[]

Defined in: packages/stentor-models/src/Request/IntentRequest.ts:155

Beta

Uploads from the request

Inherited from​

IntentRequest.attachments


overrideKey?​

optional overrideKey: string

Defined in: packages/stentor-models/src/Request/Request.ts:35

Used during forwarding and redirecting the request to another handler. When set it pulls content or paths for this key instead of for the request.

Inherited from​

IntentRequest.overrideKey


createdTime?​

optional createdTime: string

Defined in: packages/stentor-models/src/Request/Request.ts:39

When the message was created, an ISO-8601 compatible date time string

Inherited from​

IntentRequest.createdTime


userId​

userId: string

Defined in: packages/stentor-models/src/Request/Request.ts:43

ID for the user making the request.

Inherited from​

IntentRequest.userId


deviceId?​

optional deviceId: string

Defined in: packages/stentor-models/src/Request/Request.ts:47

Unique identifier provided by the channel for the user's current device.

Inherited from​

IntentRequest.deviceId


requestId?​

optional requestId: string

Defined in: packages/stentor-models/src/Request/Request.ts:51

Optional unique identifier for the request provided by the channel.

Inherited from​

IntentRequest.requestId


anonymous?​

optional anonymous: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:58

The user is anonymous, or a guest.

The user either does not yet have a verified identity or have chosen to not have any data saved about them.

Inherited from​

IntentRequest.anonymous


isNewSession?​

optional isNewSession: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:62

Is the request a new session.

Inherited from​

IntentRequest.isNewSession


accessToken?​

optional accessToken: string

Defined in: packages/stentor-models/src/Request/Request.ts:66

Access token from account linking

Inherited from​

IntentRequest.accessToken


apiAccess?​

optional apiAccess: ApiAccessData

Defined in: packages/stentor-models/src/Request/Request.ts:71

API access data from the platform In case there is an APIs that provides services like list management, messaging...

Inherited from​

IntentRequest.apiAccess


rawQuery?​

optional rawQuery: string

Defined in: packages/stentor-models/src/Request/Request.ts:75

Raw speech to text (STT) query, not available on all platforms.

Inherited from​

IntentRequest.rawQuery


platform?​

optional platform: string

Defined in: packages/stentor-models/src/Request/Request.ts:82

The platform the request came from.

Example platforms are Google's Dialogflow & Amazon's Lex.

Inherited from​

IntentRequest.platform


channel?​

optional channel: string

Defined in: packages/stentor-models/src/Request/Request.ts:86

The specific channel that the platform provides.

Inherited from​

IntentRequest.channel


device?​

optional device: Device

Defined in: packages/stentor-models/src/Request/Request.ts:93

Information about the device as far as capabilities such as screen or web browser available.

This information is available in two places, also on the context object, until it is removed from the context in the next major release.

Inherited from​

IntentRequest.device


locale?​

optional locale: Locale

Defined in: packages/stentor-models/src/Request/Request.ts:100

User's locale, such as us-EN and es-MX.

Possible values for Alexa are defined here: https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#request-locale Possible values for Dialogflow are defined here: https://dialogflow.com/docs/reference/language

Inherited from​

IntentRequest.locale


isHealthCheck?​

optional isHealthCheck: boolean

Defined in: packages/stentor-models/src/Request/Request.ts:112

Is the request a health check.

Currently only Google and Dialogflow perform health checks.

Inherited from​

IntentRequest.isHealthCheck


attributes?​

optional attributes: Record\<string, unknown>

Defined in: packages/stentor-models/src/Request/Request.ts:125

Optional request attributes to be passed through on the request.

If the channel supports it, it will be populated.

Some common keys that are use are, all optional:

  • currentUrl - For channels installed on websites, contains window.location.href information on where the user is
  • isLocal - Boolean for if the currentUrl is to localhost. If it is true then most likely currentUrl will be undefined.
  • environment - Used to override the environment

Inherited from​

IntentRequest.attributes


sentimentAnalysis?​

optional sentimentAnalysis: object

Defined in: packages/stentor-models/src/Request/Request.ts:135

An analysis on the user's query text sentiment

sentiment​

sentiment: "POSITIVE" | "NEUTRAL" | "NEGATIVE" | "MIXED"

An abstracted measure of the sentiment.

  • POSITIVE - Query has positive sentiment
  • NEUTRAL - Query has either positive or negative sentiment
  • NEGATIVE - Query has negative sentiment
  • MIXED - Query has both positive and negative sentiment

original?​

optional original: string

The original payload from the sentiment analysis engine stringified

You can use JSON.parse on this data to extract more information.

Inherited from​

IntentRequest.sentimentAnalysis