Struct google_api_proto::google::cloud::discoveryengine::v1alpha::ServingConfig
source · pub struct ServingConfig {Show 20 fields
pub name: String,
pub display_name: String,
pub solution_type: i32,
pub model_id: String,
pub diversity_level: String,
pub embedding_config: Option<EmbeddingConfig>,
pub ranking_expression: String,
pub guided_search_spec: Option<GuidedSearchSpec>,
pub custom_fine_tuning_spec: Option<CustomFineTuningSpec>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub filter_control_ids: Vec<String>,
pub boost_control_ids: Vec<String>,
pub redirect_control_ids: Vec<String>,
pub synonyms_control_ids: Vec<String>,
pub oneway_synonyms_control_ids: Vec<String>,
pub dissociate_control_ids: Vec<String>,
pub replacement_control_ids: Vec<String>,
pub ignore_control_ids: Vec<String>,
pub vertical_config: Option<VerticalConfig>,
}
Expand description
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.
Fields§
§name: String
Immutable. Fully qualified name
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
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.
solution_type: i32
Required. Immutable. Specifies the solution type that a serving config can be associated with.
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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
embedding_config: Option<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][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] and the document embeddings that are provided by this EmbeddingConfig. If [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector] is provided, it overrides this [ServingConfig.embedding_config][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
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][google.cloud.discoveryengine.v1alpha.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: Option<GuidedSearchSpec>
Guided search configs.
custom_fine_tuning_spec: Option<CustomFineTuningSpec>
Custom fine tuning configs. If [SearchRequest.custom_fine_tuning_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.custom_fine_tuning_spec] is set, it has higher priority than the configs set here.
create_time: Option<Timestamp>
Output only. ServingConfig created timestamp.
update_time: Option<Timestamp>
Output only. ServingConfig updated timestamp.
filter_control_ids: Vec<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.
boost_control_ids: Vec<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.
redirect_control_ids: Vec<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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
synonyms_control_ids: Vec<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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
oneway_synonyms_control_ids: Vec<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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
dissociate_control_ids: Vec<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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
replacement_control_ids: Vec<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][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
ignore_control_ids: Vec<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.
vertical_config: Option<VerticalConfig>
Industry vertical specific config.
Implementations§
source§impl ServingConfig
impl ServingConfig
sourcepub fn solution_type(&self) -> SolutionType
pub fn solution_type(&self) -> SolutionType
Returns the enum value of solution_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_solution_type(&mut self, value: SolutionType)
pub fn set_solution_type(&mut self, value: SolutionType)
Sets solution_type
to the provided enum value.
Trait Implementations§
source§impl Clone for ServingConfig
impl Clone for ServingConfig
source§fn clone(&self) -> ServingConfig
fn clone(&self) -> ServingConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServingConfig
impl Debug for ServingConfig
source§impl Default for ServingConfig
impl Default for ServingConfig
source§impl Message for ServingConfig
impl Message for ServingConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ServingConfig
impl PartialEq for ServingConfig
source§fn eq(&self, other: &ServingConfig) -> bool
fn eq(&self, other: &ServingConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ServingConfig
Auto Trait Implementations§
impl Freeze for ServingConfig
impl RefUnwindSafe for ServingConfig
impl Send for ServingConfig
impl Sync for ServingConfig
impl Unpin for ServingConfig
impl UnwindSafe for ServingConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request