Sessions

google.cloud.dialogflow.v2. Sessions

Represents a Sessions

Constructor

new Sessions(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Sessions service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Sessions}

Creates new Sessions service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

detectIntent(request, callback) → {undefined}

Calls DetectIntent.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDetectIntentRequest

DetectIntentRequest message or plain object

callback google.cloud.dialogflow.v2.Sessions.DetectIntentCallback

Node-style callback called with the error, if any, and DetectIntentResponse

detectIntent(request) → {Promise.<google.cloud.dialogflow.v2.DetectIntentResponse>}

Calls DetectIntent.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IDetectIntentRequest

DetectIntentRequest message or plain object

streamingDetectIntent(request, callback) → {undefined}

Calls StreamingDetectIntent.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IStreamingDetectIntentRequest

StreamingDetectIntentRequest message or plain object

callback google.cloud.dialogflow.v2.Sessions.StreamingDetectIntentCallback

Node-style callback called with the error, if any, and StreamingDetectIntentResponse

streamingDetectIntent(request) → {Promise.<google.cloud.dialogflow.v2.StreamingDetectIntentResponse>}

Calls StreamingDetectIntent.

Parameters:
Name Type Description
request google.cloud.dialogflow.v2.IStreamingDetectIntentRequest

StreamingDetectIntentRequest message or plain object

Type Definitions

DetectIntentCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Sessions#detectIntent.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.DetectIntentResponse <optional>

DetectIntentResponse

StreamingDetectIntentCallback(error, responseopt)

Callback as used by google.cloud.dialogflow.v2.Sessions#streamingDetectIntent.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.dialogflow.v2.StreamingDetectIntentResponse <optional>

StreamingDetectIntentResponse