Service Client: Google::Cloud::Dialogflow::Cx::V3::Session::SessionsClient
Client stub representing the remote Sessions gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to dialogflow.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Dialogflow::Cx::V3::Session - Compiled Protocol Buffers messages for google/cloud/dialogflow/cx/v3/session.proto
SYNOPSIS
use Google::Cloud::Dialogflow::Cx::V3::Session;
my $msg = Google::Cloud::Dialogflow::Cx::V3::Session::AnswerFeedback->new({
rating => $rating,
rating_reason => $rating_reason,
custom_rating => $custom_rating,
});
# Read or update a field
my $val = $msg->rating();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::Cx::V3::Session::AnswerFeedback->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/cx/v3/session.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Dialogflow::Cx::V3::Session::AnswerFeedback
Stores information about feedback provided by users about a response.
Inherits from Protobuf::Message.
Accessors
$msg->rating()/$msg->rating($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::AnswerFeedback::Rating)Optional. Rating from user for the specific Dialogflow response.
$msg->rating_reason()/$msg->rating_reason($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::AnswerFeedback::RatingReason)Optional. In case of thumbs down rating provided, users can optionally provide context about the rating.
$msg->custom_rating()/$msg->custom_rating($value)Type:
StringOptional. Custom rating from the user about the provided answer, with maximum length of 1024 characters. For example, client could use a customized JSON object to indicate the rating.
Enum: AnswerFeedback::Rating
RATING_UNSPECIFIED=>0THUMBS_UP=>1THUMBS_DOWN=>2
Google::Cloud::Dialogflow::Cx::V3::Session::SubmitAnswerFeedbackRequest
The request to set the feedback for a bot answer.
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringRequired. The name of the session the feedback was sent to.
$msg->response_id()/$msg->response_id($value)Type:
StringRequired. ID of the response to update its feedback. This is the same as DetectIntentResponse.response_id.
$msg->answer_feedback()/$msg->answer_feedback($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::AnswerFeedback)Required. Feedback provided for a bot answer.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Optional. The mask to control which fields to update. If the mask is not present, all fields will be updated.
Google::Cloud::Dialogflow::Cx::V3::Session::DetectIntentRequest
The request to detect user's intent.
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringRequired. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<Session ID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. 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](https://cloud.google.com/dialogflow/cx/docs/concept/session).
Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
$msg->query_params()/$msg->query_params($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryParameters)The parameters of this query.
$msg->query_input()/$msg->query_input($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryInput)Required. The input specification.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::OutputAudioConfig)Instructs the speech synthesizer how to generate the output audio.
$msg->response_view()/$msg->response_view($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::DetectIntentResponseView)Optional. Specifies which fields in the [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
Google::Cloud::Dialogflow::Cx::V3::Session::DetectIntentResponse
The message returned from the DetectIntent method.
Inherits from Protobuf::Message.
Accessors
$msg->response_id()/$msg->response_id($value)Type:
StringOutput only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
$msg->query_result()/$msg->query_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryResult)The result of the conversational query.
$msg->output_audio()/$msg->output_audio($value)Type:
BytesThe audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the [`query_result.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_messages] field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::OutputAudioConfig)The config used by the speech synthesizer to generate the output audio.
$msg->response_type()/$msg->response_type($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::DetectIntentResponse::ResponseType)Response type.
$msg->allow_cancellation()/$msg->allow_cancellation($value)Type:
BoolIndicates whether the partial response can be cancelled when a later response arrives. e.g. if the agent specified some music as partial response, it can be cancelled.
Enum: DetectIntentResponse::ResponseType
RESPONSE_TYPE_UNSPECIFIED=>0PARTIAL=>1FINAL=>2
Google::Cloud::Dialogflow::Cx::V3::Session::StreamingDetectIntentRequest
The top-level message sent by the client to the [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
Multiple request messages should be sent in order:
1. The first message must contain [session][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.session], [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] plus optionally [query_params][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_params]. If the client wants to receive an audio response, it should also contain [output_audio_config][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.output_audio_config].
2. If [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] was set to [query_input.audio.config][google.cloud.dialogflow.cx.v3.AudioInput.config], all subsequent messages must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3.AudioInput.audio] to continue with Speech recognition. If you decide to rather detect an intent from text input after you already started Speech recognition, please send a message with [query_input.text][google.cloud.dialogflow.cx.v3.QueryInput.text].
However, note that:
* Dialogflow will bill you for the audio duration so far.
* Dialogflow discards all Speech recognition results in favor of the
input text.
* Dialogflow will use the language code from the first message.
After you sent all input, you must half-close or abort the request stream.
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringThe name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<SessionID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. 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. Note: session must be set in the first request.
For more information, see the [sessions guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
$msg->query_params()/$msg->query_params($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryParameters)The parameters of this query.
$msg->query_input()/$msg->query_input($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryInput)Required. The input specification.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::OutputAudioConfig)Instructs the speech synthesizer how to generate the output audio.
$msg->enable_partial_response()/$msg->enable_partial_response($value)Type:
BoolEnable partial detect intent response. If this flag is not enabled, response stream still contains only one final `DetectIntentResponse` even if some `Fulfillment`s in the agent have been configured to return partial responses.
$msg->enable_debugging_info()/$msg->enable_debugging_info($value)Type:
BoolIf true, `StreamingDetectIntentResponse.debugging_info` will get populated.
$msg->response_view()/$msg->response_view($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::DetectIntentResponseView)Optional. Specifies which fields in the [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] to return. If not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
Google::Cloud::Dialogflow::Cx::V3::Session::CloudConversationDebuggingInfo
Cloud conversation info for easier debugging. It will get populated in `StreamingDetectIntentResponse` or `StreamingAnalyzeContentResponse` when the flag `enable_debugging_info` is set to true in corresponding requests.
Inherits from Protobuf::Message.
Accessors
$msg->audio_data_chunks()/$msg->audio_data_chunks($value)Type:
Int32Number of input audio data chunks in streaming requests.
$msg->result_end_time_offset()/$msg->result_end_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset of the end of speech utterance relative to the beginning of the first audio chunk.
$msg->first_audio_duration()/$msg->first_audio_duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Duration of first audio chunk.
$msg->single_utterance()/$msg->single_utterance($value)Type:
BoolWhether client used single utterance mode.
$msg->speech_partial_results_end_times()/$msg->speech_partial_results_end_times($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offsets of the speech partial results relative to the beginning of the stream.
$msg->speech_final_results_end_times()/$msg->speech_final_results_end_times($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offsets of the speech final results (is_final=true) relative to the beginning of the stream.
$msg->partial_responses()/$msg->partial_responses($value)Type:
Int32Total number of partial responses.
$msg->speaker_id_passive_latency_ms_offset()/$msg->speaker_id_passive_latency_ms_offset($value)Type:
Int32Time offset of Speaker ID stream close time relative to the Speech stream close time in milliseconds. Only meaningful for conversations involving passive verification.
$msg->bargein_event_triggered()/$msg->bargein_event_triggered($value)Type:
BoolWhether a barge-in event is triggered in this request.
$msg->speech_single_utterance()/$msg->speech_single_utterance($value)Type:
BoolWhether speech uses single utterance mode.
$msg->dtmf_partial_results_times()/$msg->dtmf_partial_results_times($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offsets of the DTMF partial results relative to the beginning of the stream.
$msg->dtmf_final_results_times()/$msg->dtmf_final_results_times($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offsets of the DTMF final results relative to the beginning of the stream.
$msg->single_utterance_end_time_offset()/$msg->single_utterance_end_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset of the end-of-single-utterance signal relative to the beginning of the stream.
$msg->no_speech_timeout()/$msg->no_speech_timeout($value)Type:
Message(Google::Protobuf::Duration::Duration)No speech timeout settings for the stream.
$msg->endpointing_timeout()/$msg->endpointing_timeout($value)Type:
Message(Google::Protobuf::Duration::Duration)Speech endpointing timeout settings for the stream.
$msg->is_input_text()/$msg->is_input_text($value)Type:
BoolWhether the streaming terminates with an injected text query.
$msg->client_half_close_time_offset()/$msg->client_half_close_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Client half close time in terms of input audio duration.
$msg->client_half_close_streaming_time_offset()/$msg->client_half_close_streaming_time_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Client half close time in terms of API streaming duration.
Google::Cloud::Dialogflow::Cx::V3::Session::StreamingDetectIntentResponse
The top-level message returned from the [StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
Multiple response messages can be returned in order:
* If the `StreamingDetectIntentRequest.query_input.audio` field was set, the first M messages contain `recognition_result`. Each `recognition_result` represents a more complete transcript of what the user said. The last `recognition_result` has `is_final` set to `true`.
* If the `StreamingDetectIntentRequest.enable_partial_response` field was true, the `detect_intent_response` field is populated for each of the following N responses, where 0 <= N <= 5. These responses set the [DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type] field to `PARTIAL`.
For the last response message, the `detect_intent_response` is fully populated, and [DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type] is set to `FINAL`.
Inherits from Protobuf::Message.
Accessors
$msg->recognition_result()/$msg->recognition_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::StreamingRecognitionResult)The result of speech recognition.
$msg->detect_intent_response()/$msg->detect_intent_response($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::DetectIntentResponse)The response from detect intent.
$msg->debugging_info()/$msg->debugging_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::CloudConversationDebuggingInfo)Debugging info that would get populated when `StreamingDetectIntentRequest.enable_debugging_info` is set to true.
Google::Cloud::Dialogflow::Cx::V3::Session::StreamingRecognitionResult
Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance.
While end-user audio is being processed, Dialogflow sends a series of results. Each result may contain a `transcript` value. A transcript represents a portion of the utterance. While the recognizer is processing audio, transcript values may be interim values or finalized values. Once a transcript is finalized, the `is_final` value is set to true and processing continues for the next transcript.
If `StreamingDetectIntentRequest.query_input.audio.config.single_utterance` was true, and the recognizer has completed processing audio, the `message_type` value is set to `END_OF_SINGLE_UTTERANCE and the following (last) result contains the last finalized transcript.
The complete end-user utterance is determined by concatenating the finalized transcript values received for the series of results.
In the following example, single utterance is enabled. In the case where single utterance is not enabled, result 7 would not occur.
``` Num | transcript | message_type | is_final --- | ----------------------- | ----------------------- | -------- 1 | "tube" | TRANSCRIPT | false 2 | "to be a" | TRANSCRIPT | false 3 | "to be" | TRANSCRIPT | false 4 | "to be or not to be" | TRANSCRIPT | true 5 | "that's" | TRANSCRIPT | false 6 | "that is | TRANSCRIPT | false 7 | unset | END_OF_SINGLE_UTTERANCE | unset 8 | " that is the question" | TRANSCRIPT | true ```
Concatenating the finalized transcripts with `is_final` set to true, the complete utterance becomes "to be or not to be that is the question".
Inherits from Protobuf::Message.
Accessors
$msg->message_type()/$msg->message_type($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::StreamingRecognitionResult::MessageType)Type of the result message.
$msg->transcript()/$msg->transcript($value)Type:
StringTranscript text representing the words that the user spoke. Populated if and only if `message_type` = `TRANSCRIPT`.
$msg->is_final()/$msg->is_final($value)Type:
BoolIf `false`, the `StreamingRecognitionResult` represents an interim result that may change. If `true`, the recognizer will not return any further hypotheses about this piece of the audio. May only be populated for `message_type` = `TRANSCRIPT`.
$msg->confidence()/$msg->confidence($value)Type:
FloatThe Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set.
This field is typically only provided if `is_final` is true and you should not rely on it being accurate or even set.
$msg->stability()/$msg->stability($value)Type:
FloatAn estimate of the likelihood that the speech recognizer will not change its guess about this interim recognition result: * If the value is unspecified or 0.0, Dialogflow didn't compute the stability. In particular, Dialogflow will only provide stability for `TRANSCRIPT` results with `is_final = false`. * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely unstable and 1.0 means completely stable.
$msg->speech_word_info()/$msg->speech_word_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::SpeechWordInfo)Word-specific information for the words recognized by Speech in [transcript][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and [InputAudioConfig.enable_word_info] is set.
$msg->speech_end_offset()/$msg->speech_end_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`.
$msg->language_code()/$msg->language_code($value)Type:
StringDetected language code for the transcript.
Enum: StreamingRecognitionResult::MessageType
MESSAGE_TYPE_UNSPECIFIED=>0TRANSCRIPT=>1END_OF_SINGLE_UTTERANCE=>2
Google::Cloud::Dialogflow::Cx::V3::Session::QueryParameters
Represents the parameters of a conversational query.
Inherits from Protobuf::Message.
Accessors
$msg->time_zone()/$msg->time_zone($value)Type:
StringThe time zone of this conversational query from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in the agent is used.
$msg->geo_location()/$msg->geo_location($value)Type:
Message(Google::Type::Latlng::LatLng)The geo location of this conversational query.
$msg->session_entity_types()/$msg->session_entity_types($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::SessionEntityType::SessionEntityType)Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session of this query.
$msg->payload()/$msg->payload($value)Type:
Message(Google::Protobuf::Struct::Struct)This field can be used to pass custom data into the webhook associated with the agent. Arbitrary JSON objects are supported. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: ``` { "telephony": { "caller_id": "+18558363987" } } ```
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Protobuf::Struct::Struct)Additional parameters to be put into [session parameters][SessionInfo.parameters]. To remove a parameter from the session, clients should explicitly set the parameter value to null.
You can reference the session parameters in the agent with the following format: $session.params.parameter-id.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
* MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
$msg->parameter_scope()/$msg->parameter_scope($value)Type:
StringScope for the parameters. If not specified, parameters will be treated as session parameters. Parameters with custom scope will not be put into [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
You can reference the parameters with custom scope in the agent with the following format: $parameter-scope.params.parameter-id.
$msg->current_page()/$msg->current_page($value)Type:
StringThe unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to override the [current page][QueryResult.current_page] in the session. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
If `current_page` is specified, the previous state of the session will be ignored by Dialogflow, including the [previous page][QueryResult.current_page] and the [previous session parameters][QueryResult.parameters]. In most cases, [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] and [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] should be configured together to direct a session to a specific state.
$msg->disable_webhook()/$msg->disable_webhook($value)Type:
BoolWhether to disable webhook calls for this request.
$msg->analyze_query_text_sentiment()/$msg->analyze_query_text_sentiment($value)Type:
BoolConfigures whether sentiment analysis should be performed. If not provided, sentiment analysis is not performed.
$msg->webhook_headers()/$msg->webhook_headers($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryParameters::WebhookHeadersEntry)This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through Dialogflow web console. The headers defined within this field will overwrite the headers configured through Dialogflow console if there is a conflict. Header names are case-insensitive. Google's specified headers are not allowed. Including: "Host", "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc.
$msg->flow_versions()/$msg->flow_versions($value)Type:
StringA list of flow versions to override for the request. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
If version 1 of flow X is included in this list, the traffic of flow X will go through version 1 regardless of the version configuration in the environment. Each flow can have at most one version specified in this list.
$msg->current_playbook()/$msg->current_playbook($value)Type:
StringOptional. The unique identifier of the [playbook][google.cloud.dialogflow.cx.v3.Playbook] to start or continue the session with. If `current_playbook` is specified, the previous state of the session will be ignored by Dialogflow.
Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
$msg->llm_model_settings()/$msg->llm_model_settings($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::GenerativeSettings::LlmModelSettings)Optional. Use the specified LLM model settings for processing the request.
$msg->channel()/$msg->channel($value)Type:
StringThe channel which this query is for.
If specified, only the [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] associated with the channel will be returned. If no [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] is associated with the channel, it falls back to the [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with unspecified channel.
If unspecified, the [ResponseMessage][google.cloud.dialogflow.cx.v3.ResponseMessage] with unspecified channel will be returned.
$msg->session_ttl()/$msg->session_ttl($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. Configure lifetime of the Dialogflow session. By default, a Dialogflow session remains active and its data is stored for 30 minutes after the last request is sent for the session. This value should be no longer than 1 day.
$msg->end_user_metadata()/$msg->end_user_metadata($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. Information about the end-user to improve the relevance and accuracy of generative answers.
This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure.
Example:
```json { "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] } ```
$msg->search_config()/$msg->search_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::SearchConfig)Optional. Search configuration for UCS search queries.
$msg->populate_data_store_connection_signals()/$msg->populate_data_store_connection_signals($value)Type:
BoolOptional. If set to true and data stores are involved in serving the request then DetectIntentResponse.query_result.data_store_connection_signals will be filled with data that can help evaluations.
Google::Cloud::Dialogflow::Cx::V3::Session::SearchConfig
Search configuration for UCS search queries.
Inherits from Protobuf::Message.
Accessors
$msg->boost_specs()/$msg->boost_specs($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::BoostSpecs)Optional. Boosting configuration for the datastores.
Maps from datastore name to their boost configuration. Do not specify more than one BoostSpecs for each datastore name. If multiple BoostSpecs are provided for the same datastore name, the behavior is undefined.
$msg->filter_specs()/$msg->filter_specs($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::FilterSpecs)Optional. Filter configuration for the datastores.
Maps from datastore name to the filter expression for that datastore. Do not specify more than one FilterSpecs for each datastore name. If multiple FilterSpecs are provided for the same datastore name, the behavior is undefined.
Google::Cloud::Dialogflow::Cx::V3::Session::BoostSpec
Boost specification to boost certain documents. A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation is available at https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
Inherits from Protobuf::Message.
Accessors
$msg->condition_boost_specs()/$msg->condition_boost_specs($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::BoostSpec::ConditionBoostSpec)Optional. Condition boost specifications. If a document matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
Google::Cloud::Dialogflow::Cx::V3::Session::BoostSpecs
Boost specifications for data stores.
Inherits from Protobuf::Message.
Accessors
$msg->data_stores()/$msg->data_stores($value)Type:
StringOptional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`
$msg->spec()/$msg->spec($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::BoostSpec)Optional. A list of boosting specifications.
Google::Cloud::Dialogflow::Cx::V3::Session::FilterSpecs
Filter specifications for data stores.
Inherits from Protobuf::Message.
Accessors
$msg->data_stores()/$msg->data_stores($value)Type:
StringOptional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`
$msg->filter()/$msg->filter($value)Type:
StringOptional. The filter expression to be applied. Expression syntax is documented at https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
Google::Cloud::Dialogflow::Cx::V3::Session::QueryInput
Represents the query input. It can contain one of:
1. A conversational query in the form of text.
2. An intent query that specifies which intent to trigger.
3. Natural language speech audio to be processed.
4. An event to be triggered.
5. DTMF digits to invoke an intent and fill in parameter value.
6. The results of a tool executed by the client.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::TextInput)The natural language text to be processed.
$msg->intent()/$msg->intent($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::IntentInput)The intent to be triggered.
$msg->audio()/$msg->audio($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::AudioInput)The natural language speech audio to be processed.
$msg->event()/$msg->event($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::EventInput)The event to be triggered.
$msg->dtmf()/$msg->dtmf($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::DtmfInput)The DTMF event to be handled.
$msg->tool_call_result()/$msg->tool_call_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::ToolCall::ToolCallResult)The results of a tool executed by the client.
$msg->language_code()/$msg->language_code($value)Type:
StringRequired. The language of the input. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
Google::Cloud::Dialogflow::Cx::V3::Session::QueryResult
Represents the result of a conversational query.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringIf [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field will contain a copy of the text.
$msg->trigger_intent()/$msg->trigger_intent($value)Type:
StringIf an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as input, this field will contain a copy of the intent identifier. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
$msg->transcript()/$msg->transcript($value)Type:
StringIf [natural language speech audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, this field will contain the transcript for the audio.
$msg->trigger_event()/$msg->trigger_event($value)Type:
StringIf an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain the name of the event.
$msg->dtmf()/$msg->dtmf($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::DtmfInput)If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, this field will contain a copy of the [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput].
$msg->language_code()/$msg->language_code($value)Type:
StringThe language that was triggered during intent detection. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes.
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Protobuf::Struct::Struct)The collected [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
* MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
$msg->response_messages()/$msg->response_messages($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::ResponseMessage::ResponseMessage)The list of rich messages returned to the client. Responses vary from simple text messages to more sophisticated, structured payloads used to drive complex logic.
$msg->webhook_statuses()/$msg->webhook_statuses($value)Type:
Message(Google::Rpc::Status::Status)The list of webhook call status in the order of call sequence.
$msg->webhook_payloads()/$msg->webhook_payloads($value)Type:
Message(Google::Protobuf::Struct::Struct)The list of webhook payload in [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], in the order of call sequence. If some webhook call fails or doesn't return any payload, an empty `Struct` would be used instead.
$msg->current_page()/$msg->current_page($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Page::Page)The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`.
$msg->current_flow()/$msg->current_flow($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Flow::Flow)The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`.
$msg->intent()/$msg->intent($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Intent::Intent)The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: `name` and `display_name`. This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] instead.
$msg->intent_detection_confidence()/$msg->intent_detection_confidence($value)Type:
FloatThe intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] instead.
$msg->match()/$msg->match($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::Match)Intent match result, could be an intent or an event.
$msg->diagnostic_info()/$msg->diagnostic_info($value)Type:
Message(Google::Protobuf::Struct::Struct)The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure.
One of the fields is called "Alternative Matched Intents", which may aid with debugging. The following describes these intent results:
- The list is empty if no intent was matched to end-user input. - Only intents that are referenced in the currently active flow are included. - The matched intent is included. - Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of [scope](https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope), are included. - Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
$msg->sentiment_analysis_result()/$msg->sentiment_analysis_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::SentimentAnalysisResult)The sentiment analyss result, which depends on [`analyze_query_text_sentiment`] [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], specified in the request.
$msg->advanced_settings()/$msg->advanced_settings($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AdvancedSettings::AdvancedSettings)Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.
$msg->allow_answer_feedback()/$msg->allow_answer_feedback($value)Type:
BoolIndicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.
$msg->data_store_connection_signals()/$msg->data_store_connection_signals($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::DataStoreConnection::DataStoreConnectionSignals)Optional. Data store connection feature output signals. Filled only when data stores are involved in serving the query.
$msg->trace_blocks()/$msg->trace_blocks($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Trace::TraceBlock)Optional. Contains the sequence of trace blocks from the current conversation turn. Trace blocks are ordered chronologically and contain detailed traces of runtime behavior such as tool calls, LLM calls, flow and playbook invocations, agent utterances and user utterances.
Google::Cloud::Dialogflow::Cx::V3::Session::TextInput
Represents the natural language text to be processed.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringRequired. The UTF-8 encoded natural language text to be processed.
Google::Cloud::Dialogflow::Cx::V3::Session::IntentInput
Represents the intent to trigger programmatically rather than as a result of natural language processing.
Inherits from Protobuf::Message.
Accessors
$msg->intent()/$msg->intent($value)Type:
StringRequired. The unique identifier of the intent. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
Google::Cloud::Dialogflow::Cx::V3::Session::AudioInput
Represents the natural speech audio to be processed.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::InputAudioConfig)Required. Instructs the speech recognizer how to process the speech audio.
$msg->audio()/$msg->audio($value)Type:
BytesThe natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The [transcribed text][google.cloud.dialogflow.cx.v3.QueryResult.transcript] cannot contain more than 256 bytes.
For non-streaming audio detect intent, both `config` and `audio` must be provided. For streaming audio detect intent, `config` must be provided in the first request and `audio` must be provided in all following requests.
Google::Cloud::Dialogflow::Cx::V3::Session::EventInput
Represents the event to trigger.
Inherits from Protobuf::Message.
Accessors
$msg->event()/$msg->event($value)Type:
StringName of the event.
Google::Cloud::Dialogflow::Cx::V3::Session::DtmfInput
Represents the input for dtmf event.
Inherits from Protobuf::Message.
Accessors
$msg->digits()/$msg->digits($value)Type:
StringThe dtmf digits.
$msg->finish_digit()/$msg->finish_digit($value)Type:
StringThe finish digit (if any).
Google::Cloud::Dialogflow::Cx::V3::Session::Match
Represents one match result of [MatchIntent][].
Inherits from Protobuf::Message.
Accessors
$msg->intent()/$msg->intent($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Intent::Intent)The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. Some, not all fields are filled in this message, including but not limited to: `name` and `display_name`. Only filled for [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type.
$msg->event()/$msg->event($value)Type:
StringThe event that matched the query. Filled for [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types.
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Protobuf::Struct::Struct)The collection of parameters extracted from the query.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
* MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
$msg->resolved_input()/$msg->resolved_input($value)Type:
StringFinal text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.
$msg->match_type()/$msg->match_type($value)Type:
Enum(Google::Cloud::Dialogflow::Cx::V3::Match::MatchType)Type of this [Match][google.cloud.dialogflow.cx.v3.Match].
$msg->confidence()/$msg->confidence($value)Type:
FloatThe confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.
Enum: Match::MatchType
MATCH_TYPE_UNSPECIFIED=>0INTENT=>1DIRECT_INTENT=>2PARAMETER_FILLING=>3NO_MATCH=>4NO_INPUT=>5EVENT=>6KNOWLEDGE_CONNECTOR=>8PLAYBOOK=>9
Google::Cloud::Dialogflow::Cx::V3::Session::MatchIntentRequest
Request of [MatchIntent][].
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringRequired. The name of the session this query is sent to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<SessionID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>`. 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](https://cloud.google.com/dialogflow/cx/docs/concept/session).
$msg->query_params()/$msg->query_params($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryParameters)The parameters of this query.
$msg->query_input()/$msg->query_input($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryInput)Required. The input specification.
$msg->persist_parameter_changes()/$msg->persist_parameter_changes($value)Type:
BoolPersist session parameter changes from `query_params`.
Google::Cloud::Dialogflow::Cx::V3::Session::MatchIntentResponse
Response of [MatchIntent][].
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringIf [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field will contain a copy of the text.
$msg->trigger_intent()/$msg->trigger_intent($value)Type:
StringIf an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as input, this field will contain a copy of the intent identifier. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
$msg->transcript()/$msg->transcript($value)Type:
StringIf [natural language speech audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, this field will contain the transcript for the audio.
$msg->trigger_event()/$msg->trigger_event($value)Type:
StringIf an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain a copy of the event name.
$msg->matches()/$msg->matches($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::Match)Match results, if more than one, ordered descendingly by the confidence we have that the particular intent matches the query.
$msg->current_page()/$msg->current_page($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Page::Page)The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`.
Google::Cloud::Dialogflow::Cx::V3::Session::FulfillIntentRequest
Request of [FulfillIntent][]
Inherits from Protobuf::Message.
Accessors
$msg->match_intent_request()/$msg->match_intent_request($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::MatchIntentRequest)Must be same as the corresponding MatchIntent request, otherwise the behavior is undefined.
$msg->match()/$msg->match($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::Match)The matched intent/event to fulfill.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::OutputAudioConfig)Instructs the speech synthesizer how to generate output audio.
Google::Cloud::Dialogflow::Cx::V3::Session::FulfillIntentResponse
Response of [FulfillIntent][]
Inherits from Protobuf::Message.
Accessors
$msg->response_id()/$msg->response_id($value)Type:
StringOutput only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
$msg->query_result()/$msg->query_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::Session::QueryResult)The result of the conversational query.
$msg->output_audio()/$msg->output_audio($value)Type:
BytesThe audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the [`query_result.response_messages`][google.cloud.dialogflow.cx.v3.QueryResult.response_messages] field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3::AudioConfig::OutputAudioConfig)The config used by the speech synthesizer to generate the output audio.
Google::Cloud::Dialogflow::Cx::V3::Session::SentimentAnalysisResult
The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral.
Inherits from Protobuf::Message.
Accessors
$msg->score()/$msg->score($value)Type:
FloatSentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
$msg->magnitude()/$msg->magnitude($value)Type:
FloatA non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::Cx::V3::Session::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.