ServingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)
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.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
media_config |
google.cloud.discoveryengine_v1alpha.types.ServingConfig.MediaConfig
The MediaConfig of the serving configuration. This field is a member of oneof _ vertical_config .
|
generic_config |
google.cloud.discoveryengine_v1alpha.types.ServingConfig.GenericConfig
The GenericConfig of the serving configuration. This field is a member of oneof _ vertical_config .
|
name |
str
Immutable. Fully qualified name projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
|
display_name |
str
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. |
solution_type |
google.cloud.discoveryengine_v1alpha.types.SolutionType
Required. Immutable. Specifies the solution type that a serving config can be associated with. |
model_id |
str
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. |
diversity_level |
str
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.
|
embedding_config |
google.cloud.discoveryengine_v1alpha.types.EmbeddingConfig
Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config. |
ranking_expression |
str
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). |
guided_search_spec |
google.cloud.discoveryengine_v1alpha.types.GuidedSearchSpec
Guided search configs. |
custom_fine_tuning_spec |
google.cloud.discoveryengine_v1alpha.types.CustomFineTuningSpec
Custom fine tuning configs. |
create_time |
google.protobuf.timestamp_pb2.Timestamp
Output only. ServingConfig created timestamp. |
update_time |
google.protobuf.timestamp_pb2.Timestamp
Output only. ServingConfig updated timestamp. |
filter_control_ids |
MutableSequence[str]
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. |
boost_control_ids |
MutableSequence[str]
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. |
redirect_control_ids |
MutableSequence[str]
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. |
synonyms_control_ids |
MutableSequence[str]
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. |
oneway_synonyms_control_ids |
MutableSequence[str]
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. |
dissociate_control_ids |
MutableSequence[str]
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. |
replacement_control_ids |
MutableSequence[str]
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. |
ignore_control_ids |
MutableSequence[str]
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. |
Classes
GenericConfig
GenericConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Specifies the configurations needed for Generic Discovery.Currently we support:
content_search_spec
: configuration for generic content search.
MediaConfig
MediaConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)
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.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields