Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfig
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb
Overview
Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.
Instance Attribute Summary collapse
-
#boost_control_ids ⇒ Array<String>
Boost controls to use in serving path.
-
#create_time ⇒ String
Output only.
-
#custom_fine_tuning_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec
Defines custom fine tuning spec.
-
#display_name ⇒ String
Required.
-
#dissociate_control_ids ⇒ Array<String>
Condition do not associate specifications.
-
#diversity_level ⇒ String
How much diversity to use in recommendation model results e.g.
-
#embedding_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaEmbeddingConfig
Defines embedding config, used for bring your own embeddings feature.
-
#filter_control_ids ⇒ Array<String>
Filter controls to use in serving path.
-
#generic_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig
Specifies the configurations needed for Generic Discovery.Currently we support: *
content_search_spec: configuration for generic content search. -
#guided_search_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec
Defines guided search spec.
-
#ignore_control_ids ⇒ Array<String>
Condition ignore specifications.
-
#media_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig
Specifies the configurations needed for Media Discovery.
-
#model_id ⇒ String
The id of the model to use at serving time.
-
#name ⇒ String
Immutable.
-
#oneway_synonyms_control_ids ⇒ Array<String>
Condition oneway synonyms specifications.
-
#ranking_expression ⇒ String
The ranking expression controls the customized ranking on retrieval documents.
-
#redirect_control_ids ⇒ Array<String>
IDs of the redirect controls.
-
#replacement_control_ids ⇒ Array<String>
Condition replacement specifications.
-
#solution_type ⇒ String
Required.
-
#synonyms_control_ids ⇒ Array<String>
Condition synonyms specifications.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaServingConfig
constructor
A new instance of GoogleCloudDiscoveryengineV1alphaServingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaServingConfig
Returns a new instance of GoogleCloudDiscoveryengineV1alphaServingConfig.
9499 9500 9501 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9499 def initialize(**args) update!(**args) end |
Instance Attribute Details
#boost_control_ids ⇒ Array<String>
Boost controls to use in serving path. All triggered boost controls will be
applied. Boost controls must be in the same data store as the serving config.
Maximum of 20 boost controls.
Corresponds to the JSON property boostControlIds
9345 9346 9347 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9345 def boost_control_ids @boost_control_ids end |
#create_time ⇒ String
Output only. ServingConfig created timestamp.
Corresponds to the JSON property createTime
9350 9351 9352 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9350 def create_time @create_time end |
#custom_fine_tuning_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec
Defines custom fine tuning spec.
Corresponds to the JSON property customFineTuningSpec
9355 9356 9357 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9355 def custom_fine_tuning_spec @custom_fine_tuning_spec end |
#display_name ⇒ String
Required. The human readable serving config display name. Used in Discovery UI.
This field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property displayName
9362 9363 9364 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9362 def display_name @display_name end |
#dissociate_control_ids ⇒ Array<String>
Condition do not associate specifications. If multiple do not associate
conditions match, all matching do not associate controls in the list will
execute. Order does not matter. Maximum number of specifications is 100. Can
only be set if SolutionType is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property dissociateControlIds
9370 9371 9372 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9370 def dissociate_control_ids @dissociate_control_ids end |
#diversity_level ⇒ String
How much diversity to use in recommendation model results e.g. medium-
diversity or high-diversity. Currently supported values: * no-diversity *
low-diversity * medium-diversity * high-diversity * auto-diversity If
not specified, we choose default based on recommendation model type. Default
value: no-diversity. Can only be set if SolutionType is
SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property diversityLevel
9380 9381 9382 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9380 def diversity_level @diversity_level end |
#embedding_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaEmbeddingConfig
Defines embedding config, used for bring your own embeddings feature.
Corresponds to the JSON property embeddingConfig
9385 9386 9387 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9385 def @embedding_config end |
#filter_control_ids ⇒ Array<String>
Filter controls to use in serving path. All triggered filter controls will be
applied. Filter controls must be in the same data store as the serving config.
Maximum of 20 filter controls.
Corresponds to the JSON property filterControlIds
9392 9393 9394 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9392 def filter_control_ids @filter_control_ids end |
#generic_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig
Specifies the configurations needed for Generic Discovery.Currently we support:
content_search_spec: configuration for generic content search. Corresponds to the JSON propertygenericConfig
9398 9399 9400 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9398 def generic_config @generic_config end |
#guided_search_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec
Defines guided search spec.
Corresponds to the JSON property guidedSearchSpec
9403 9404 9405 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9403 def guided_search_spec @guided_search_spec end |
#ignore_control_ids ⇒ Array<String>
Condition ignore specifications. If multiple ignore conditions match, all
matching ignore controls in the list will execute. Order does not matter.
Maximum number of specifications is 100.
Corresponds to the JSON property ignoreControlIds
9410 9411 9412 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9410 def ignore_control_ids @ignore_control_ids end |
#media_config ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig
Specifies the configurations needed for Media Discovery. Currently we support:
demote_content_watched: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. *promote_fresh_content: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION. Corresponds to the JSON propertymediaConfig
9424 9425 9426 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9424 def media_config @media_config end |
#model_id ⇒ String
The id of the model to use at serving time. Currently only
RecommendationModels are supported. Can be changed but only to a compatible
model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
SolutionType is SOLUTION_TYPE_RECOMMENDATION.
Corresponds to the JSON property modelId
9432 9433 9434 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9432 def model_id @model_id end |
#name ⇒ String
Immutable. Fully qualified name projects/project/locations/location/
collections/collection_id/engines/engine_id/servingConfigs/
serving_config_id`
Corresponds to the JSON propertyname`
9439 9440 9441 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9439 def name @name end |
#oneway_synonyms_control_ids ⇒ Array<String>
Condition oneway synonyms specifications. If multiple oneway synonyms
conditions match, all matching oneway synonyms controls in the list will
execute. Maximum number of specifications is 100. Can only be set if
SolutionType is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property onewaySynonymsControlIds
9447 9448 9449 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9447 def oneway_synonyms_control_ids @oneway_synonyms_control_ids end |
#ranking_expression ⇒ String
The ranking expression controls the customized ranking on retrieval documents.
To leverage this, document embedding is required. The ranking expression
setting in ServingConfig applies to all search requests served by the serving
config. However, if SearchRequest.ranking_expression is specified, it
overrides the ServingConfig ranking expression. The ranking expression is a
single function or multiple functions that are joined by "+". *
ranking_expression = function, " + ", function; Supported functions: *
double * relevance_score * double * dotProduct(embedding_field_path) Function
variables: relevance_score: pre-defined keywords, used for measure relevance
between query and document. embedding_field_path: the document embedding field
used with query embedding vector. dotProduct: embedding function between
embedding_field_path and query embedding vector. Example ranking expression:
If document has an embedding field doc_embedding, the ranking expression could
be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).
Corresponds to the JSON property rankingExpression
9465 9466 9467 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9465 def ranking_expression @ranking_expression end |
#redirect_control_ids ⇒ Array<String>
IDs of the redirect controls. Only the first triggered redirect action is
applied, even if multiple apply. Maximum number of specifications is 100. Can
only be set if SolutionType is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property redirectControlIds
9472 9473 9474 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9472 def redirect_control_ids @redirect_control_ids end |
#replacement_control_ids ⇒ Array<String>
Condition replacement specifications. Applied according to the order in the
list. A previously replaced term can not be re-replaced. Maximum number of
specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property replacementControlIds
9479 9480 9481 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9479 def replacement_control_ids @replacement_control_ids end |
#solution_type ⇒ String
Required. Immutable. Specifies the solution type that a serving config can be
associated with.
Corresponds to the JSON property solutionType
9485 9486 9487 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9485 def solution_type @solution_type end |
#synonyms_control_ids ⇒ Array<String>
Condition synonyms specifications. If multiple synonyms conditions match, all
matching synonyms controls in the list will execute. Maximum number of
specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
Corresponds to the JSON property synonymsControlIds
9492 9493 9494 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9492 def synonyms_control_ids @synonyms_control_ids end |
#update_time ⇒ String
Output only. ServingConfig updated timestamp.
Corresponds to the JSON property updateTime
9497 9498 9499 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9497 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 9504 def update!(**args) @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids) @create_time = args[:create_time] if args.key?(:create_time) @custom_fine_tuning_spec = args[:custom_fine_tuning_spec] if args.key?(:custom_fine_tuning_spec) @display_name = args[:display_name] if args.key?(:display_name) @dissociate_control_ids = args[:dissociate_control_ids] if args.key?(:dissociate_control_ids) @diversity_level = args[:diversity_level] if args.key?(:diversity_level) @embedding_config = args[:embedding_config] if args.key?(:embedding_config) @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids) @generic_config = args[:generic_config] if args.key?(:generic_config) @guided_search_spec = args[:guided_search_spec] if args.key?(:guided_search_spec) @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids) @media_config = args[:media_config] if args.key?(:media_config) @model_id = args[:model_id] if args.key?(:model_id) @name = args[:name] if args.key?(:name) @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids) @ranking_expression = args[:ranking_expression] if args.key?(:ranking_expression) @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids) @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids) @solution_type = args[:solution_type] if args.key?(:solution_type) @synonyms_control_ids = args[:synonyms_control_ids] if args.key?(:synonyms_control_ids) @update_time = args[:update_time] if args.key?(:update_time) end |