Class: Google::Cloud::Dialogflow::CX::V3::Fulfillment
- Inherits:
-
Object
- Object
- Google::Cloud::Dialogflow::CX::V3::Fulfillment
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb
Overview
A fulfillment can do one or more of the following actions at the same time:
- Generate rich message responses.
- Set parameter values.
- Call the webhook.
Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.
Defined Under Namespace
Classes: ConditionalCases, SetParameterAction
Instance Attribute Summary collapse
-
#advanced_settings ⇒ ::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings
Hierarchical advanced settings for this fulfillment.
-
#conditional_cases ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>
Conditional cases for this fulfillment.
-
#enable_generative_fallback ⇒ ::Boolean
If the flag is true, the agent will utilize LLM to generate a text response.
-
#messages ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>
The list of rich message responses to present to the user.
-
#return_partial_responses ⇒ ::Boolean
Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs.
-
#set_parameter_actions ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>
Set parameter values before executing the webhook.
-
#tag ⇒ ::String
The value of this field will be populated in the WebhookRequest
fulfillmentInfo.tag
field by Dialogflow when the associated webhook is called. -
#webhook ⇒ ::String
The webhook to call.
Instance Attribute Details
#advanced_settings ⇒ ::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings
Returns Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#conditional_cases ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>
Returns Conditional cases for this fulfillment.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#enable_generative_fallback ⇒ ::Boolean
Returns If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#messages ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::ResponseMessage>
Returns The list of rich message responses to present to the user.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#return_partial_responses ⇒ ::Boolean
Returns Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#set_parameter_actions ⇒ ::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::SetParameterAction>
Returns Set parameter values before executing the webhook.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#tag ⇒ ::String
Returns The value of this field will be populated in the
WebhookRequest
fulfillmentInfo.tag
field by Dialogflow when the associated webhook is
called.
The tag is typically used by the webhook service to identify which
fulfillment is being called, but it could be used for other purposes.
This field is required if webhook
is specified.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |
#webhook ⇒ ::String
Returns The webhook to call.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>
.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb', line 85 class Fulfillment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Setting a parameter value. # @!attribute [rw] parameter # @return [::String] # Display name of the parameter. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The new value of the parameter. A null value clears the parameter. class SetParameterAction include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A list of cascading if-else conditions. Cases are mutually exclusive. # The first one with a matching condition is selected, all the rest ignored. # @!attribute [rw] cases # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case>] # A list of cascading if-else conditions. class ConditionalCases include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Each case has a Boolean condition. When it is evaluated to be True, the # corresponding messages will be selected and evaluated recursively. # @!attribute [rw] condition # @return [::String] # The condition to activate and select this case. Empty means the # condition is always true. The condition is evaluated against [form # parameters][Form.parameters] or [session # parameters][SessionInfo.parameters]. # # See the [conditions # reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). # @!attribute [rw] case_content # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases::Case::CaseContent>] # A list of case content. class Case include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The list of messages or conditional cases to activate for this case. # @!attribute [rw] message # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage] # Returned message. # @!attribute [rw] additional_cases # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases] # Additional cases to be evaluated. class CaseContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end |