Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::ResponseMessage.
Represents a response message that can be returned by a conversational agent.
Response messages are also used for output audio synthesis. The approach is as follows:
- If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis.
- If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design.
- Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis.
This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#channel
def channel() -> ::String
- (::String) — The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.
#channel=
def channel=(value) -> ::String
- value (::String) — The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.
- (::String) — The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.
#conversation_success
def conversation_success() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ConversationSuccess
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ConversationSuccess) — Indicates that the conversation succeeded.
Note: The following fields are mutually exclusive:
conversation_success
,text
,payload
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#conversation_success=
def conversation_success=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ConversationSuccess
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ConversationSuccess) — Indicates that the conversation succeeded.
Note: The following fields are mutually exclusive:
conversation_success
,text
,payload
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ConversationSuccess) — Indicates that the conversation succeeded.
Note: The following fields are mutually exclusive:
conversation_success
,text
,payload
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#end_interaction
def end_interaction() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::EndInteraction
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::EndInteraction) — Output only. A signal that indicates the interaction with the Dialogflow
agent has ended. This message is generated by Dialogflow only when the
conversation reaches
END_SESSION
page. It is not supposed to be defined by the user.It's guaranteed that there is at most one such message in each response.
Note: The following fields are mutually exclusive:
end_interaction
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#knowledge_info_card
def knowledge_info_card() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard) — Represents info card for knowledge answers, to be better rendered in
Dialogflow Messenger.
Note: The following fields are mutually exclusive:
knowledge_info_card
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#knowledge_info_card=
def knowledge_info_card=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard) — Represents info card for knowledge answers, to be better rendered in
Dialogflow Messenger.
Note: The following fields are mutually exclusive:
knowledge_info_card
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard) — Represents info card for knowledge answers, to be better rendered in
Dialogflow Messenger.
Note: The following fields are mutually exclusive:
knowledge_info_card
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#live_agent_handoff
def live_agent_handoff() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::LiveAgentHandoff
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::LiveAgentHandoff) — Hands off conversation to a human agent.
Note: The following fields are mutually exclusive:
live_agent_handoff
,text
,payload
,conversation_success
,output_audio_text
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#live_agent_handoff=
def live_agent_handoff=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::LiveAgentHandoff
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::LiveAgentHandoff) — Hands off conversation to a human agent.
Note: The following fields are mutually exclusive:
live_agent_handoff
,text
,payload
,conversation_success
,output_audio_text
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::LiveAgentHandoff) — Hands off conversation to a human agent.
Note: The following fields are mutually exclusive:
live_agent_handoff
,text
,payload
,conversation_success
,output_audio_text
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#mixed_audio
def mixed_audio() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::MixedAudio
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::MixedAudio) — Output only. An audio response message composed of both the synthesized
Dialogflow agent responses and responses defined via
play_audio.
This message is generated by Dialogflow only and not supposed to be
defined by the user.
Note: The following fields are mutually exclusive:
mixed_audio
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#output_audio_text
def output_audio_text() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::OutputAudioText
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::OutputAudioText) — A text or ssml response that is preferentially used for TTS output audio
synthesis, as described in the comment on the ResponseMessage message.
Note: The following fields are mutually exclusive:
output_audio_text
,text
,payload
,conversation_success
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#output_audio_text=
def output_audio_text=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::OutputAudioText
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::OutputAudioText) — A text or ssml response that is preferentially used for TTS output audio
synthesis, as described in the comment on the ResponseMessage message.
Note: The following fields are mutually exclusive:
output_audio_text
,text
,payload
,conversation_success
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::OutputAudioText) — A text or ssml response that is preferentially used for TTS output audio
synthesis, as described in the comment on the ResponseMessage message.
Note: The following fields are mutually exclusive:
output_audio_text
,text
,payload
,conversation_success
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#payload
def payload() -> ::Google::Protobuf::Struct
-
(::Google::Protobuf::Struct) — Returns a response containing a custom, platform-specific payload.
Note: The following fields are mutually exclusive:
payload
,text
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#payload=
def payload=(value) -> ::Google::Protobuf::Struct
-
value (::Google::Protobuf::Struct) — Returns a response containing a custom, platform-specific payload.
Note: The following fields are mutually exclusive:
payload
,text
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Protobuf::Struct) — Returns a response containing a custom, platform-specific payload.
Note: The following fields are mutually exclusive:
payload
,text
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#play_audio
def play_audio() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::PlayAudio
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::PlayAudio) — Signal that the client should play an audio clip hosted at a
client-specific URI. Dialogflow uses this to construct
mixed_audio.
However, Dialogflow itself does not try to read or process the URI in any
way.
Note: The following fields are mutually exclusive:
play_audio
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#play_audio=
def play_audio=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::PlayAudio
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::PlayAudio) — Signal that the client should play an audio clip hosted at a
client-specific URI. Dialogflow uses this to construct
mixed_audio.
However, Dialogflow itself does not try to read or process the URI in any
way.
Note: The following fields are mutually exclusive:
play_audio
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::PlayAudio) — Signal that the client should play an audio clip hosted at a
client-specific URI. Dialogflow uses this to construct
mixed_audio.
However, Dialogflow itself does not try to read or process the URI in any
way.
Note: The following fields are mutually exclusive:
play_audio
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#response_type
def response_type() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType
- (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType) — Response type.
#response_type=
def response_type=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType
- value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType) — Response type.
- (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType) — Response type.
#telephony_transfer_call
def telephony_transfer_call() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall) — A signal that the client should transfer the phone call connected to
this agent to a third-party endpoint.
Note: The following fields are mutually exclusive:
telephony_transfer_call
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#telephony_transfer_call=
def telephony_transfer_call=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall) — A signal that the client should transfer the phone call connected to
this agent to a third-party endpoint.
Note: The following fields are mutually exclusive:
telephony_transfer_call
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall) — A signal that the client should transfer the phone call connected to
this agent to a third-party endpoint.
Note: The following fields are mutually exclusive:
telephony_transfer_call
,text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#text
def text() -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::Text
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::Text) — Returns a text response.
Note: The following fields are mutually exclusive:
text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#text=
def text=(value) -> ::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::Text
-
value (::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::Text) — Returns a text response.
Note: The following fields are mutually exclusive:
text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::Text) — Returns a text response.
Note: The following fields are mutually exclusive:
text
,payload
,conversation_success
,output_audio_text
,live_agent_handoff
,end_interaction
,play_audio
,mixed_audio
,telephony_transfer_call
,knowledge_info_card
. If a field in that set is populated, all other fields in the set will automatically be cleared.