Class: Google::Cloud::Ces::V1beta::WidgetTool
- Inherits:
-
Object
- Object
- Google::Cloud::Ces::V1beta::WidgetTool
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/ces/v1beta/widget_tool.rb
Overview
Represents a widget tool that the agent can invoke. When the tool is chosen by the agent, agent will return the widget to the client. The client is responsible for processing the widget and generating the next user query to continue the interaction with the agent.
Defined Under Namespace
Modules: WidgetType Classes: DataMapping, TextResponseConfig
Instance Attribute Summary collapse
-
#data_mapping ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping
Optional.
-
#description ⇒ ::String
Optional.
-
#name ⇒ ::String
Required.
-
#parameters ⇒ ::Google::Cloud::Ces::V1beta::Schema
Optional.
-
#text_response_config ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig
Optional.
-
#ui_config ⇒ ::Google::Protobuf::Struct
Optional.
-
#widget_type ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::WidgetType
Optional.
Instance Attribute Details
#data_mapping ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping
Returns Optional. The mapping that defines how data from a source tool is mapped to the widget's input parameters.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#description ⇒ ::String
Returns Optional. The description of the widget tool.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#name ⇒ ::String
Returns Required. The display name of the widget tool.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#parameters ⇒ ::Google::Cloud::Ces::V1beta::Schema
Returns Optional. The input parameters of the widget tool.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#text_response_config ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig
Returns Optional. Configuration for always-included text responses.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#ui_config ⇒ ::Google::Protobuf::Struct
Returns Optional. Configuration for rendering the widget.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |
#widget_type ⇒ ::Google::Cloud::Ces::V1beta::WidgetTool::WidgetType
Returns Optional. The type of the widget tool. If not specified, the default type will be CUSTOMIZED.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'proto_docs/google/cloud/ces/v1beta/widget_tool.rb', line 51 class WidgetTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Configuration for the text response returned with the widget. # @!attribute [rw] type # @return [::Google::Cloud::Ces::V1beta::WidgetTool::TextResponseConfig::Type] # Optional. The strategy for providing the text response. # @!attribute [rw] static_text # @return [::String] # Optional. The static text response to return when type is STATIC. # @!attribute [rw] text_response_instruction # @return [::String] # Optional. Instruction for the LLM on how to generate the text response. # Used as the description for the text response parameter if type is # LLM_GENERATED. class TextResponseConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines how the text response is produced. module Type # Unspecified type. TYPE_UNSPECIFIED = 0 # The LLM dynamically decides whether to generate a text response # alongside the widget based on the conversation context. NONE = 1 # The LLM is explicitly required to generate a text response. LLM_GENERATED = 2 # A pre-defined static text response is always used. STATIC = 3 end end # Configuration for mapping data from a source tool to the widget's input # parameters. # @!attribute [rw] source_tool_name # @return [::String] # Optional. The resource name of the tool that provides the data for the # widget (e.g., a search tool or a custom function). Format: # `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` # @!attribute [rw] field_mappings # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. A map of widget input parameter fields to the corresponding # output fields of the source tool. # @!attribute [rw] python_function # @return [::Google::Cloud::Ces::V1beta::PythonFunction] # Optional. Configuration for a Python function used to transform the # source tool's output into the widget's input format. # @!attribute [rw] mode # @return [::Google::Cloud::Ces::V1beta::WidgetTool::DataMapping::Mode] # Optional. The mode of the data mapping. # @!attribute [rw] python_script # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::String] # Deprecated: Use `python_function` instead. class DataMapping include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class FieldMappingsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The strategy used to map data from the source tool to the widget. module Mode # Unspecified mode. MODE_UNSPECIFIED = 0 # Use the `field_mappings` map for data transformation. FIELD_MAPPING = 1 # Use the `python_script` for data transformation. PYTHON_SCRIPT = 2 end end # All available widget types. # New values may be added to this enum in the future. module WidgetType # Unspecified widget type. WIDGET_TYPE_UNSPECIFIED = 0 # Custom widget type. CUSTOM = 1 # Product carousel widget. PRODUCT_CAROUSEL = 2 # Product details widget. PRODUCT_DETAILS = 3 # Quick actions widget. QUICK_ACTIONS = 4 # Product comparison widget. PRODUCT_COMPARISON = 5 # Advanced product details widget. ADVANCED_PRODUCT_DETAILS = 6 # Short form widget. SHORT_FORM = 7 # Overall satisfaction widget. OVERALL_SATISFACTION = 8 # Order summary widget. ORDER_SUMMARY = 9 # Appointment details widget. APPOINTMENT_DETAILS = 10 # Appointment scheduler widget. APPOINTMENT_SCHEDULER = 11 # Contact form widget. CONTACT_FORM = 12 end end |