public class Sessions.SessionsClient : ClientBase<Sessions.SessionsClient>
Reference documentation and code samples for the Google Cloud Dialogflow v2 API class Sessions.SessionsClient.
Client for Sessions
Namespace
Google.Cloud.Dialogflow.V2Assembly
Google.Cloud.Dialogflow.V2.dll
Constructors
SessionsClient()
protected SessionsClient()
Protected parameterless constructor to allow creation of test doubles.
SessionsClient(CallInvoker)
public SessionsClient(CallInvoker callInvoker)
Creates a new client for Sessions that uses a custom CallInvoker
.
Parameter | |
---|---|
Name | Description |
callInvoker |
CallInvoker The callInvoker to use to make remote calls. |
SessionsClient(ChannelBase)
public SessionsClient(ChannelBase channel)
Creates a new client for Sessions
Parameter | |
---|---|
Name | Description |
channel |
ChannelBase The channel to use to make remote calls. |
SessionsClient(ClientBaseConfiguration)
protected SessionsClient(ClientBase.ClientBaseConfiguration configuration)
Protected constructor to allow creation of configured clients.
Parameter | |
---|---|
Name | Description |
configuration |
ClientBaseClientBaseConfiguration The client configuration. |
Methods
CreateLocationsClient()
public virtual Locations.LocationsClient CreateLocationsClient()
Creates a new instance of Locations.LocationsClient using the same call invoker as this client.
Returns | |
---|---|
Type | Description |
LocationsLocationsClient |
A new Locations.LocationsClient for the same target as this client. |
DetectIntent(DetectIntentRequest, CallOptions)
public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, CallOptions options)
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
instead of DetectIntent
. AnalyzeContent
has additional
functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameters | |
---|---|
Name | Description |
request |
DetectIntentRequest The request to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
DetectIntentResponse |
The response received from the server. |
DetectIntent(DetectIntentRequest, Metadata, DateTime?, CancellationToken)
public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
instead of DetectIntent
. AnalyzeContent
has additional
functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameters | |
---|---|
Name | Description |
request |
DetectIntentRequest The request to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
DetectIntentResponse |
The response received from the server. |
DetectIntentAsync(DetectIntentRequest, CallOptions)
public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, CallOptions options)
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
instead of DetectIntent
. AnalyzeContent
has additional
functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameters | |
---|---|
Name | Description |
request |
DetectIntentRequest The request to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallDetectIntentResponse |
The call object. |
DetectIntentAsync(DetectIntentRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
instead of DetectIntent
. AnalyzeContent
has additional
functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameters | |
---|---|
Name | Description |
request |
DetectIntentRequest The request to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallDetectIntentResponse |
The call object. |
NewInstance(ClientBaseConfiguration)
protected override Sessions.SessionsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Creates a new instance of client from given ClientBaseConfiguration
.
Parameter | |
---|---|
Name | Description |
configuration |
ClientBaseClientBaseConfiguration |
Returns | |
---|---|
Type | Description |
SessionsSessionsClient |
StreamingDetectIntent(CallOptions)
public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(CallOptions options)
Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
instead of StreamingDetectIntent
. StreamingAnalyzeContent
has
additional functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameter | |
---|---|
Name | Description |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncDuplexStreamingCallStreamingDetectIntentRequestStreamingDetectIntentResponse |
The call object. |
StreamingDetectIntent(Metadata, DateTime?, CancellationToken)
public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).
If you might use
Agent Assist
or other CCAI products now or in the future, consider using
[StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
instead of StreamingDetectIntent
. StreamingAnalyzeContent
has
additional functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
Parameters | |
---|---|
Name | Description |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncDuplexStreamingCallStreamingDetectIntentRequestStreamingDetectIntentResponse |
The call object. |