Class: Google::Cloud::Ces::V1::DataStoreTool
- Inherits:
-
Object
- Object
- Google::Cloud::Ces::V1::DataStoreTool
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/ces/v1/data_store_tool.rb
Overview
Tool to retrieve from Vertex AI Search datastore or engine for grounding. Accepts either a datastore or an engine, but not both. See Vertex AI Search: https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction.
Defined Under Namespace
Modules: FilterParameterBehavior Classes: BoostSpec, BoostSpecs, DataStoreSource, EngineSource, GroundingConfig, ModalityConfig, RewriterConfig, SummarizationConfig
Instance Attribute Summary collapse
-
#boost_specs ⇒ ::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpecs>
Optional.
-
#data_store_source ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource
Optional.
-
#description ⇒ ::String
Optional.
-
#engine_source ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::EngineSource
Optional.
-
#filter_parameter_behavior ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::FilterParameterBehavior
Optional.
-
#modality_configs ⇒ ::Array<::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig>
Optional.
-
#name ⇒ ::String
Required.
Instance Attribute Details
#boost_specs ⇒ ::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpecs>
Returns Optional. Boost specification to boost certain documents.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#data_store_source ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource
Returns Optional. Search within a single specific DataStore.
Note: The following fields are mutually exclusive: data_store_source, engine_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#description ⇒ ::String
Returns Optional. The tool description.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#engine_source ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::EngineSource
Returns Optional. Search within an Engine (potentially across multiple DataStores).
Note: The following fields are mutually exclusive: engine_source, data_store_source. If a field in that set is populated, all other fields in the set will automatically be cleared.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#filter_parameter_behavior ⇒ ::Google::Cloud::Ces::V1::DataStoreTool::FilterParameterBehavior
Returns Optional. The filter parameter behavior.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#modality_configs ⇒ ::Array<::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig>
Returns Optional. The modality configs for the data store.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |
#name ⇒ ::String
Returns Required. The data store tool name.
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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'proto_docs/google/cloud/ces/v1/data_store_tool.rb', line 54 class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Rewriter configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Required. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether the rewriter is disabled. class RewriterConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Summarization configuration. # @!attribute [rw] model_settings # @return [::Google::Cloud::Ces::V1::ModelSettings] # Optional. Configurations for the LLM model. # @!attribute [rw] prompt # @return [::String] # Optional. The prompt definition. If not set, default prompt will be used. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether summarization is disabled. class SummarizationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Grounding configuration. # @!attribute [rw] grounding_level # @return [::Float] # Optional. The groundedness threshold of the answer based on the retrieved # sources. The value has a configurable range of [1, 5]. The level is used # to threshold the groundedness of the answer, meaning that all responses # with a groundedness score below the threshold will fall back to returning # relevant snippets only. # # For example, a level of 3 means that the groundedness score must be # 3 or higher for the response to be returned. # @!attribute [rw] disabled # @return [::Boolean] # Optional. Whether grounding is disabled. class GroundingConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within a specific DataStore. # @!attribute [rw] filter # @return [::String] # Optional. Filter specification for the DataStore. # See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata # @!attribute [rw] data_store # @return [::Google::Cloud::Ces::V1::DataStore] # Optional. The data store. class DataStoreSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for searching within an Engine, potentially targeting # specific DataStores. # @!attribute [rw] engine # @return [::String] # Required. Full resource name of the Engine. # Format: # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` # @!attribute [rw] data_store_sources # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::DataStoreSource>] # Optional. Use to target specific DataStores within the Engine. # If empty, the search applies to all DataStores associated with the # Engine. # @!attribute [rw] filter # @return [::String] # Optional. A filter applied to the search across the Engine. Not relevant # and not used if 'data_store_sources' is provided. See: # https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata class EngineSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specifications to boost certain documents. # For more information, please refer to # https://cloud.google.com/generative-ai-app-builder/docs/boosting. # @!attribute [rw] data_stores # @return [::Array<::String>] # Required. The Data Store where the boosting configuration is applied. # Full resource name of DataStore, such as # projects/\\{project}/locations/\\{location}/collections/\\{collection}/dataStores/\\{dataStore}. # @!attribute [rw] spec # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec>] # Required. A list of boosting specifications. class BoostSpecs include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Boost specification to boost certain documents. # @!attribute [rw] condition_boost_specs # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec>] # Required. A list of boosting specifications. class BoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Boost specification for a condition. # @!attribute [rw] condition # @return [::String] # Required. An expression which specifies a boost condition. The syntax # is the same as filter expression syntax. Currently, the only supported # condition is a list of BCP-47 lang codes. Example: To boost suggestions # in languages en or fr: (lang_code: ANY("en", "fr")) # @!attribute [rw] boost # @return [::Float] # Optional. Strength of the boost, which should be in [-1, 1]. Negative # boost means demotion. Default is 0.0. # # Setting to 1.0 gives the suggestions a big promotion. However, it does # not necessarily mean that the top result will be a boosted suggestion. # # Setting to -1.0 gives the suggestions a big demotion. However, other # suggestions that are relevant might still be shown. # # Setting to 0.0 means no boost applied. The boosting condition is # ignored. # @!attribute [rw] boost_control_spec # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec] # Optional. Complex specification for custom ranking based on customer # defined attribute value. class ConditionBoostSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification for custom ranking based on customer specified attribute # value. It provides more controls for customized ranking than the simple # (condition, boost) combination above. # @!attribute [rw] field_name # @return [::String] # Optional. The name of the field whose value will be used to determine # the boost amount. # @!attribute [rw] attribute_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType] # Optional. The attribute type to be used to determine the boost # amount. The attribute value can be derived from the field value of # the specified field_name. In the case of numerical it is # straightforward i.e. attribute_value = numerical_field_value. In the # case of freshness however, attribute_value = (time.now() - # datetime_field_value). # @!attribute [rw] interpolation_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType] # Optional. The interpolation type to be applied to connect the control # points listed below. # @!attribute [rw] control_points # @return [::Array<::Google::Cloud::Ces::V1::DataStoreTool::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>] # Optional. The control points used to define the curve. The monotonic # function (defined through the interpolation_type above) passes # through the control points listed here. class BoostControlSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The control points used to define the curve. The curve defined # through these control points can only be monotonically increasing # or decreasing(constant values are acceptable). # @!attribute [rw] attribute_value # @return [::String] # Optional. Can be one of: # 1. The numerical field value. # 2. The duration spec for freshness: # The value must be formatted as an XSD `dayTimeDuration` value (a # restricted subset of an ISO 8601 duration value). The pattern for # this is: `[nD][T[nH][nM][nS]]`. # @!attribute [rw] boost_amount # @return [::Float] # Optional. The value between -1 to 1 by which to boost the score if # the attribute_value evaluates to the value specified above. class ControlPoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute(or function) for which the custom ranking is to be # applied. module AttributeType # Unspecified AttributeType. ATTRIBUTE_TYPE_UNSPECIFIED = 0 # The value of the numerical field will be used to dynamically update # the boost amount. In this case, the attribute_value (the x value) # of the control point will be the actual value of the numerical # field for which the boost_amount is specified. NUMERICAL = 1 # For the freshness use case the attribute value will be the duration # between the current time and the date in the datetime field # specified. The value must be formatted as an XSD `dayTimeDuration` # value (a restricted subset of an ISO 8601 duration value). The # pattern for this is: `[nD][T[nH][nM][nS]]`. # E.g. `5D`, `3DT12H30M`, `T24H`. FRESHNESS = 2 end # The interpolation type to be applied. Default will be linear # (Piecewise Linear). module InterpolationType # Interpolation type is unspecified. In this case, it defaults to # Linear. INTERPOLATION_TYPE_UNSPECIFIED = 0 # Piecewise linear interpolation will be applied. LINEAR = 1 end end end end # If specified, will apply the given configuration for the specified # modality. # @!attribute [rw] modality_type # @return [::Google::Cloud::Ces::V1::DataStoreTool::ModalityConfig::ModalityType] # Required. The modality type. # @!attribute [rw] rewriter_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::RewriterConfig] # Optional. The rewriter config. # @!attribute [rw] summarization_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::SummarizationConfig] # Optional. The summarization config. # @!attribute [rw] grounding_config # @return [::Google::Cloud::Ces::V1::DataStoreTool::GroundingConfig] # Optional. The grounding configuration. class ModalityConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The modality type. module ModalityType # Unspecified modality type. MODALITY_TYPE_UNSPECIFIED = 0 # Text modality. TEXT = 1 # Audio modality. AUDIO = 2 end end # Filter parameter behavior. module FilterParameterBehavior # Default filter behavior. # Include filter parameter for connector datastores. # For the rest of the datastore types, the filter input parameter is # omitted. FILTER_PARAMETER_BEHAVIOR_UNSPECIFIED = 0 # Always include filter parameter for all datastore types. ALWAYS_INCLUDE = 2 # The filter parameter is never included in the list of tool parameters, # regardless of the datastore type. NEVER_INCLUDE = 3 end end |