- 1.37.0 (latest)
- 1.36.0
- 1.35.0
- 1.34.1
- 1.33.0
- 1.32.1
- 1.31.1
- 1.30.1
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.1
- 1.22.0
- 1.21.0
- 1.20.1
- 1.19.0
- 1.18.0
- 1.17.1
- 1.16.0
- 1.15.0
- 1.14.1
- 1.13.5
- 1.12.1
- 1.11.0
- 1.10.0
- 1.9.1
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.2
- 1.2.0
- 1.1.1
- 1.0.0
- 0.8.2
- 0.7.1
- 0.6.0
- 0.5.0
- 0.4.1
- 0.3.0
- 0.2.0
- 0.1.1
ResponseMessage(mapping=None, *, ignore_unknown_fields=False, **kwargs)
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.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
text |
google.cloud.dialogflowcx_v3.types.ResponseMessage.Text
Returns a text response. This field is a member of oneof _ message .
|
payload |
google.protobuf.struct_pb2.Struct
Returns a response containing a custom, platform-specific payload. This field is a member of oneof _ message .
|
conversation_success |
google.cloud.dialogflowcx_v3.types.ResponseMessage.ConversationSuccess
Indicates that the conversation succeeded. This field is a member of oneof _ message .
|
output_audio_text |
google.cloud.dialogflowcx_v3.types.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. This field is a member of oneof _ message .
|
live_agent_handoff |
google.cloud.dialogflowcx_v3.types.ResponseMessage.LiveAgentHandoff
Hands off conversation to a human agent. This field is a member of oneof _ message .
|
end_interaction |
google.cloud.dialogflowcx_v3.types.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.
This field is a member of oneof _ message .
|
play_audio |
google.cloud.dialogflowcx_v3.types.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. This field is a member of oneof _ message .
|
mixed_audio |
google.cloud.dialogflowcx_v3.types.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. This field is a member of oneof _ message .
|
telephony_transfer_call |
google.cloud.dialogflowcx_v3.types.ResponseMessage.TelephonyTransferCall
A signal that the client should transfer the phone call connected to this agent to a third-party endpoint. This field is a member of oneof _ message .
|
knowledge_info_card |
google.cloud.dialogflowcx_v3.types.ResponseMessage.KnowledgeInfoCard
Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger. This field is a member of oneof _ message .
|
response_type |
google.cloud.dialogflowcx_v3.types.ResponseMessage.ResponseType
Response type. |
channel |
str
The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. |
Classes
ConversationSuccess
ConversationSuccess(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about.
Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess.
You may set this, for example:
- In the entry_fulfillment of a Page if entering the page indicates that the conversation succeeded.
- In a webhook response when you determine that you handled the customer issue.
EndInteraction
EndInteraction(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Indicates that interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only and not supposed to be defined by the user.
KnowledgeInfoCard
KnowledgeInfoCard(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card.
Otherwise, the info card response is skipped.
LiveAgentHandoff
LiveAgentHandoff(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Indicates that the conversation should be handed off to a live agent.
Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures.
You may set this, for example:
- In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation.
- In a webhook response when you determine that the customer issue can only be handled by a human.
MixedAudio
MixedAudio(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. The external URIs are specified via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
OutputAudioText
OutputAudioText(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
PlayAudio
PlayAudio(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Specifies an audio clip to be played by the client as part of the response.
ResponseType
ResponseType(value)
Represents different response types.
TelephonyTransferCall
TelephonyTransferCall(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Text
Text(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The text response message.