Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1ServingConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1ServingConfig

Returns a new instance of GoogleCloudDiscoveryengineV1ServingConfig.



6302
6303
6304
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6302

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#answer_generation_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1AnswerGenerationSpec

The specification for answer generation. Corresponds to the JSON property answerGenerationSpec



6150
6151
6152
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6150

def answer_generation_spec
  @answer_generation_spec
end

#boost_control_idsArray<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

Returns:

  • (Array<String>)


6157
6158
6159
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6157

def boost_control_ids
  @boost_control_ids
end

#create_timeString

Output only. ServingConfig created timestamp. Corresponds to the JSON property createTime

Returns:

  • (String)


6162
6163
6164
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6162

def create_time
  @create_time
end

#display_nameString

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

Returns:

  • (String)


6169
6170
6171
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6169

def display_name
  @display_name
end

#dissociate_control_idsArray<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

Returns:

  • (Array<String>)


6177
6178
6179
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6177

def dissociate_control_ids
  @dissociate_control_ids
end

#diversity_levelString

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

Returns:

  • (String)


6187
6188
6189
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6187

def diversity_level
  @diversity_level
end

#filter_control_idsArray<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

Returns:

  • (Array<String>)


6194
6195
6196
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6194

def filter_control_ids
  @filter_control_ids
end

#generic_configGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1ServingConfigGenericConfig

Specifies the configurations needed for Generic Discovery.Currently we support:

  • content_search_spec: configuration for generic content search. Corresponds to the JSON property genericConfig


6200
6201
6202
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6200

def generic_config
  @generic_config
end

#ignore_control_idsArray<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

Returns:

  • (Array<String>)


6207
6208
6209
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6207

def ignore_control_ids
  @ignore_control_ids
end

#media_configGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1ServingConfigMediaConfig

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 property mediaConfig


6221
6222
6223
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6221

def media_config
  @media_config
end

#model_idString

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

Returns:

  • (String)


6229
6230
6231
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6229

def model_id
  @model_id
end

#nameString

Immutable. Fully qualified name projects/project/locations/location/ collections/collection_id/engines/engine_id/servingConfigs/ serving_config_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


6236
6237
6238
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6236

def name
  @name
end

#oneway_synonyms_control_idsArray<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

Returns:

  • (Array<String>)


6244
6245
6246
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6244

def oneway_synonyms_control_ids
  @oneway_synonyms_control_ids
end

#promote_control_idsArray<String>

Condition promote specifications. Maximum number of specifications is 100. Corresponds to the JSON property promoteControlIds

Returns:

  • (Array<String>)


6249
6250
6251
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6249

def promote_control_ids
  @promote_control_ids
end

#ranking_expressionString

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

Returns:

  • (String)


6268
6269
6270
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6268

def ranking_expression
  @ranking_expression
end

#redirect_control_idsArray<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

Returns:

  • (Array<String>)


6275
6276
6277
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6275

def redirect_control_ids
  @redirect_control_ids
end

#replacement_control_idsArray<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

Returns:

  • (Array<String>)


6282
6283
6284
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6282

def replacement_control_ids
  @replacement_control_ids
end

#solution_typeString

Required. Immutable. Specifies the solution type that a serving config can be associated with. Corresponds to the JSON property solutionType

Returns:

  • (String)


6288
6289
6290
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6288

def solution_type
  @solution_type
end

#synonyms_control_idsArray<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

Returns:

  • (Array<String>)


6295
6296
6297
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6295

def synonyms_control_ids
  @synonyms_control_ids
end

#update_timeString

Output only. ServingConfig updated timestamp. Corresponds to the JSON property updateTime

Returns:

  • (String)


6300
6301
6302
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6300

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6307

def update!(**args)
  @answer_generation_spec = args[:answer_generation_spec] if args.key?(:answer_generation_spec)
  @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
  @create_time = args[:create_time] if args.key?(:create_time)
  @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)
  @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
  @generic_config = args[:generic_config] if args.key?(:generic_config)
  @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)
  @promote_control_ids = args[:promote_control_ids] if args.key?(:promote_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