class ProjectsLocationsAgentsSessions extends Resource (View source)

The "sessions" collection of methods.

Typical usage is:

 $dialogflowService = new Google\Service\Dialogflow(...);
 $sessions = $dialogflowService->projects_locations_agents_sessions;

Methods

detectIntent(string $session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, array $optParams = [])

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

fulfillIntent(string $session, GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody, array $optParams = [])

Fulfills a matched intent returned by MatchIntent. Must be called after MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is undefined. (sessions.fulfillIntent)

matchIntent(string $session, GoogleCloudDialogflowCxV3MatchIntentRequest $postBody, array $optParams = [])

Returns preliminary intent match results, doesn't change the session status.

serverStreamingDetectIntent(string $session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, array $optParams = [])

Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send partial responses earlier in a single request.

submitAnswerFeedback(string $session, GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest $postBody, array $optParams = [])

Updates the feedback received from the user for a single turn of the bot response. (sessions.submitAnswerFeedback)

Details

GoogleCloudDialogflowCxV3DetectIntentResponse detectIntent(string $session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, array $optParams = [])

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments. (sessions.detectIntent)

Parameters

string $session

Required. The name of the session this query is sent to. Format: projects//locations//agents//sessions/ or projects//locations//agents//environments//sessions/. If Environment ID is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length of the Session ID must not exceed 36 characters. For more information, see the sessions guide. Note: Always use agent versions for production traffic. See Versions and environments.

GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3DetectIntentResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3FulfillIntentResponse fulfillIntent(string $session, GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody, array $optParams = [])

Fulfills a matched intent returned by MatchIntent. Must be called after MatchIntent, with input from MatchIntentResponse. Otherwise, the behavior is undefined. (sessions.fulfillIntent)

Parameters

string $session

Required. The name of the session this query is sent to. Format: projects//locations//agents//sessions/ or projects//locations//agents//environments//sessions/. If Environment ID is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length of the Session ID must not exceed 36 characters. For more information, see the sessions guide.

GoogleCloudDialogflowCxV3FulfillIntentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3FulfillIntentResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3MatchIntentResponse matchIntent(string $session, GoogleCloudDialogflowCxV3MatchIntentRequest $postBody, array $optParams = [])

Returns preliminary intent match results, doesn't change the session status.

(sessions.matchIntent)

Parameters

string $session

Required. The name of the session this query is sent to. Format: projects//locations//agents//sessions/ or projects//locations//agents//environments//sessions/. If Environment ID is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length of the Session ID must not exceed 36 characters. For more information, see the sessions guide.

GoogleCloudDialogflowCxV3MatchIntentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3MatchIntentResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3DetectIntentResponse serverStreamingDetectIntent(string $session, GoogleCloudDialogflowCxV3DetectIntentRequest $postBody, array $optParams = [])

Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send partial responses earlier in a single request.

(sessions.serverStreamingDetectIntent)

Parameters

string $session

Required. The name of the session this query is sent to. Format: projects//locations//agents//sessions/ or projects//locations//agents//environments//sessions/. If Environment ID is not specified, we assume default 'draft' environment. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length of the Session ID must not exceed 36 characters. For more information, see the sessions guide. Note: Always use agent versions for production traffic. See Versions and environments.

GoogleCloudDialogflowCxV3DetectIntentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3DetectIntentResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3AnswerFeedback submitAnswerFeedback(string $session, GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest $postBody, array $optParams = [])

Updates the feedback received from the user for a single turn of the bot response. (sessions.submitAnswerFeedback)

Parameters

string $session

Required. The name of the session the feedback was sent to.

GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3AnswerFeedback

Exceptions

Exception