Represents a Sessions
Inheritance
$protobuf.rpc.Service > protos.google.cloud.dialogflow.v2beta1.SessionsPackage
@google-cloud/dialogflowConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);Constructs a new Sessions service.
| Parameters | |
|---|---|
| Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Methods
create(rpcImpl, requestDelimited, responseDelimited)
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions;Creates new Sessions service using the specified rpc implementation.
| Parameters | |
|---|---|
| Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
| Returns | |
|---|---|
| Type | Description |
Sessions |
RPC service. Useful where requests and/or responses are streamed. |
detectIntent(request, callback)
public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.DetectIntentCallback): void;Calls DetectIntent.
| Parameters | |
|---|---|
| Name | Description |
request |
IDetectIntentRequest
DetectIntentRequest message or plain object |
callback |
DetectIntentCallback
Node-style callback called with the error, if any, and DetectIntentResponse |
| Returns | |
|---|---|
| Type | Description |
void |
|
detectIntent(request)
public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest): Promise<google.cloud.dialogflow.v2beta1.DetectIntentResponse>;Calls DetectIntent.
| Parameter | |
|---|---|
| Name | Description |
request |
IDetectIntentRequest
DetectIntentRequest message or plain object |
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.dialogflow.v2beta1.DetectIntentResponse> |
Promise |
streamingDetectIntent(request, callback)
public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntentCallback): void;Calls StreamingDetectIntent.
| Parameters | |
|---|---|
| Name | Description |
request |
IStreamingDetectIntentRequest
StreamingDetectIntentRequest message or plain object |
callback |
StreamingDetectIntentCallback
Node-style callback called with the error, if any, and StreamingDetectIntentResponse |
| Returns | |
|---|---|
| Type | Description |
void |
|
streamingDetectIntent(request)
public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest): Promise<google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse>;Calls StreamingDetectIntent.
| Parameter | |
|---|---|
| Name | Description |
request |
IStreamingDetectIntentRequest
StreamingDetectIntentRequest message or plain object |
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse> |
Promise |