Google Cloud Dialogflow v2 API - Class Sessions.SessionsBase (4.25.0)

[BindServiceMethod(typeof(Sessions), "BindService")]
public abstract class Sessions.SessionsBase

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class Sessions.SessionsBase.

Base class for server-side implementations of Sessions

Inheritance

object > Sessions.SessionsBase

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Methods

DetectIntent(DetectIntentRequest, ServerCallContext)

public virtual Task<DetectIntentResponse> DetectIntent(DetectIntentRequest request, ServerCallContext context)

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 received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDetectIntentResponse

The response to send back to the client (wrapped by a task).

StreamingDetectIntent(IAsyncStreamReader<StreamingDetectIntentRequest>, IServerStreamWriter<StreamingDetectIntentResponse>, ServerCallContext)

public virtual Task StreamingDetectIntent(IAsyncStreamReader<StreamingDetectIntentRequest> requestStream, IServerStreamWriter<StreamingDetectIntentResponse> responseStream, ServerCallContext context)

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
requestStream IAsyncStreamReaderStreamingDetectIntentRequest

Used for reading requests from the client.

responseStream IServerStreamWriterStreamingDetectIntentResponse

Used for sending responses back to the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
Task

A task indicating completion of the handler.