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

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

Returns:
Type Description
undefined

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

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.DetectIntentResponse>

Promise

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

Returns:
Type Description
undefined

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

Returns:
Type Description
Promise.<google.cloud.dialogflow.v2.StreamingDetectIntentResponse>

Promise

(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

Returns:
Type Description
Sessions

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

DetectIntentCallback(error, responseopt)

Callback as used by 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 streamingDetectIntent.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

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

StreamingDetectIntentResponse