google-apis-discoveryengine_v1beta 0.51.0 → 0.53.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1839,8 +1839,8 @@ module Google
1839
1839
  attr_accessor :display_name
1840
1840
 
1841
1841
  # The industry vertical that the engine registers. The restriction of the Engine
1842
- # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
1843
- # Vertical on Engine has to match vertical of the DataStore linked to the engine.
1842
+ # industry vertical is based on DataStore: Vertical on Engine has to match
1843
+ # vertical of the DataStore linked to the engine.
1844
1844
  # Corresponds to the JSON property `industryVertical`
1845
1845
  # @return [String]
1846
1846
  attr_accessor :industry_vertical
@@ -2697,6 +2697,610 @@ module Google
2697
2697
  end
2698
2698
  end
2699
2699
 
2700
+ # A specification for configuring the behavior of content search.
2701
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec
2702
+ include Google::Apis::Core::Hashable
2703
+
2704
+ # Specifies the chunk spec to be returned from the search response. Only
2705
+ # available if the SearchRequest.ContentSearchSpec.search_result_mode is set to
2706
+ # CHUNKS
2707
+ # Corresponds to the JSON property `chunkSpec`
2708
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec]
2709
+ attr_accessor :chunk_spec
2710
+
2711
+ # A specification for configuring the extractive content in a search response.
2712
+ # Corresponds to the JSON property `extractiveContentSpec`
2713
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec]
2714
+ attr_accessor :extractive_content_spec
2715
+
2716
+ # Specifies the search result mode. If unspecified, the search result mode
2717
+ # defaults to `DOCUMENTS`.
2718
+ # Corresponds to the JSON property `searchResultMode`
2719
+ # @return [String]
2720
+ attr_accessor :search_result_mode
2721
+
2722
+ # A specification for configuring snippets in a search response.
2723
+ # Corresponds to the JSON property `snippetSpec`
2724
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec]
2725
+ attr_accessor :snippet_spec
2726
+
2727
+ # A specification for configuring a summary returned in a search response.
2728
+ # Corresponds to the JSON property `summarySpec`
2729
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec]
2730
+ attr_accessor :summary_spec
2731
+
2732
+ def initialize(**args)
2733
+ update!(**args)
2734
+ end
2735
+
2736
+ # Update properties of this object
2737
+ def update!(**args)
2738
+ @chunk_spec = args[:chunk_spec] if args.key?(:chunk_spec)
2739
+ @extractive_content_spec = args[:extractive_content_spec] if args.key?(:extractive_content_spec)
2740
+ @search_result_mode = args[:search_result_mode] if args.key?(:search_result_mode)
2741
+ @snippet_spec = args[:snippet_spec] if args.key?(:snippet_spec)
2742
+ @summary_spec = args[:summary_spec] if args.key?(:summary_spec)
2743
+ end
2744
+ end
2745
+
2746
+ # Specifies the chunk spec to be returned from the search response. Only
2747
+ # available if the SearchRequest.ContentSearchSpec.search_result_mode is set to
2748
+ # CHUNKS
2749
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec
2750
+ include Google::Apis::Core::Hashable
2751
+
2752
+ # The number of next chunks to be returned of the current chunk. The maximum
2753
+ # allowed value is 3. If not specified, no next chunks will be returned.
2754
+ # Corresponds to the JSON property `numNextChunks`
2755
+ # @return [Fixnum]
2756
+ attr_accessor :num_next_chunks
2757
+
2758
+ # The number of previous chunks to be returned of the current chunk. The maximum
2759
+ # allowed value is 3. If not specified, no previous chunks will be returned.
2760
+ # Corresponds to the JSON property `numPreviousChunks`
2761
+ # @return [Fixnum]
2762
+ attr_accessor :num_previous_chunks
2763
+
2764
+ def initialize(**args)
2765
+ update!(**args)
2766
+ end
2767
+
2768
+ # Update properties of this object
2769
+ def update!(**args)
2770
+ @num_next_chunks = args[:num_next_chunks] if args.key?(:num_next_chunks)
2771
+ @num_previous_chunks = args[:num_previous_chunks] if args.key?(:num_previous_chunks)
2772
+ end
2773
+ end
2774
+
2775
+ # A specification for configuring the extractive content in a search response.
2776
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec
2777
+ include Google::Apis::Core::Hashable
2778
+
2779
+ # The maximum number of extractive answers returned in each search result. An
2780
+ # extractive answer is a verbatim answer extracted from the original document,
2781
+ # which provides a precise and contextually relevant answer to the search query.
2782
+ # If the number of matching answers is less than the `
2783
+ # max_extractive_answer_count`, return all of the answers. Otherwise, return the
2784
+ # `max_extractive_answer_count`. At most five answers are returned for each
2785
+ # SearchResult.
2786
+ # Corresponds to the JSON property `maxExtractiveAnswerCount`
2787
+ # @return [Fixnum]
2788
+ attr_accessor :max_extractive_answer_count
2789
+
2790
+ # The max number of extractive segments returned in each search result. Only
2791
+ # applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or
2792
+ # DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a
2793
+ # text segment extracted from the original document that is relevant to the
2794
+ # search query, and, in general, more verbose than an extractive answer. The
2795
+ # segment could then be used as input for LLMs to generate summaries and answers.
2796
+ # If the number of matching segments is less than `max_extractive_segment_count`
2797
+ # , return all of the segments. Otherwise, return the `
2798
+ # max_extractive_segment_count`.
2799
+ # Corresponds to the JSON property `maxExtractiveSegmentCount`
2800
+ # @return [Fixnum]
2801
+ attr_accessor :max_extractive_segment_count
2802
+
2803
+ # Return at most `num_next_segments` segments after each selected segments.
2804
+ # Corresponds to the JSON property `numNextSegments`
2805
+ # @return [Fixnum]
2806
+ attr_accessor :num_next_segments
2807
+
2808
+ # Specifies whether to also include the adjacent from each selected segments.
2809
+ # Return at most `num_previous_segments` segments before each selected segments.
2810
+ # Corresponds to the JSON property `numPreviousSegments`
2811
+ # @return [Fixnum]
2812
+ attr_accessor :num_previous_segments
2813
+
2814
+ # Specifies whether to return the confidence score from the extractive segments
2815
+ # in each search result. This feature is available only for new or allowlisted
2816
+ # data stores. To allowlist your data store, contact your Customer Engineer. The
2817
+ # default value is `false`.
2818
+ # Corresponds to the JSON property `returnExtractiveSegmentScore`
2819
+ # @return [Boolean]
2820
+ attr_accessor :return_extractive_segment_score
2821
+ alias_method :return_extractive_segment_score?, :return_extractive_segment_score
2822
+
2823
+ def initialize(**args)
2824
+ update!(**args)
2825
+ end
2826
+
2827
+ # Update properties of this object
2828
+ def update!(**args)
2829
+ @max_extractive_answer_count = args[:max_extractive_answer_count] if args.key?(:max_extractive_answer_count)
2830
+ @max_extractive_segment_count = args[:max_extractive_segment_count] if args.key?(:max_extractive_segment_count)
2831
+ @num_next_segments = args[:num_next_segments] if args.key?(:num_next_segments)
2832
+ @num_previous_segments = args[:num_previous_segments] if args.key?(:num_previous_segments)
2833
+ @return_extractive_segment_score = args[:return_extractive_segment_score] if args.key?(:return_extractive_segment_score)
2834
+ end
2835
+ end
2836
+
2837
+ # A specification for configuring snippets in a search response.
2838
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec
2839
+ include Google::Apis::Core::Hashable
2840
+
2841
+ # [DEPRECATED] This field is deprecated. To control snippet return, use `
2842
+ # return_snippet` field. For backwards compatibility, we will return snippet if
2843
+ # max_snippet_count > 0.
2844
+ # Corresponds to the JSON property `maxSnippetCount`
2845
+ # @return [Fixnum]
2846
+ attr_accessor :max_snippet_count
2847
+
2848
+ # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
2849
+ # Corresponds to the JSON property `referenceOnly`
2850
+ # @return [Boolean]
2851
+ attr_accessor :reference_only
2852
+ alias_method :reference_only?, :reference_only
2853
+
2854
+ # If `true`, then return snippet. If no snippet can be generated, we return "No
2855
+ # snippet is available for this page." A `snippet_status` with `SUCCESS` or `
2856
+ # NO_SNIPPET_AVAILABLE` will also be returned.
2857
+ # Corresponds to the JSON property `returnSnippet`
2858
+ # @return [Boolean]
2859
+ attr_accessor :return_snippet
2860
+ alias_method :return_snippet?, :return_snippet
2861
+
2862
+ def initialize(**args)
2863
+ update!(**args)
2864
+ end
2865
+
2866
+ # Update properties of this object
2867
+ def update!(**args)
2868
+ @max_snippet_count = args[:max_snippet_count] if args.key?(:max_snippet_count)
2869
+ @reference_only = args[:reference_only] if args.key?(:reference_only)
2870
+ @return_snippet = args[:return_snippet] if args.key?(:return_snippet)
2871
+ end
2872
+ end
2873
+
2874
+ # A specification for configuring a summary returned in a search response.
2875
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec
2876
+ include Google::Apis::Core::Hashable
2877
+
2878
+ # Specifies whether to filter out adversarial queries. The default value is `
2879
+ # false`. Google employs search-query classification to detect adversarial
2880
+ # queries. No summary is returned if the search query is classified as an
2881
+ # adversarial query. For example, a user might ask a question regarding negative
2882
+ # comments about the company or submit a query designed to generate unsafe,
2883
+ # policy-violating output. If this field is set to `true`, we skip generating
2884
+ # summaries for adversarial queries and return fallback messages instead.
2885
+ # Corresponds to the JSON property `ignoreAdversarialQuery`
2886
+ # @return [Boolean]
2887
+ attr_accessor :ignore_adversarial_query
2888
+ alias_method :ignore_adversarial_query?, :ignore_adversarial_query
2889
+
2890
+ # Optional. Specifies whether to filter out jail-breaking queries. The default
2891
+ # value is `false`. Google employs search-query classification to detect jail-
2892
+ # breaking queries. No summary is returned if the search query is classified as
2893
+ # a jail-breaking query. A user might add instructions to the query to change
2894
+ # the tone, style, language, content of the answer, or ask the model to act as a
2895
+ # different entity, e.g. "Reply in the tone of a competing company's CEO". If
2896
+ # this field is set to `true`, we skip generating summaries for jail-breaking
2897
+ # queries and return fallback messages instead.
2898
+ # Corresponds to the JSON property `ignoreJailBreakingQuery`
2899
+ # @return [Boolean]
2900
+ attr_accessor :ignore_jail_breaking_query
2901
+ alias_method :ignore_jail_breaking_query?, :ignore_jail_breaking_query
2902
+
2903
+ # Specifies whether to filter out queries that have low relevance. The default
2904
+ # value is `false`. If this field is set to `false`, all search results are used
2905
+ # regardless of relevance to generate answers. If set to `true`, only queries
2906
+ # with high relevance search results will generate answers.
2907
+ # Corresponds to the JSON property `ignoreLowRelevantContent`
2908
+ # @return [Boolean]
2909
+ attr_accessor :ignore_low_relevant_content
2910
+ alias_method :ignore_low_relevant_content?, :ignore_low_relevant_content
2911
+
2912
+ # Specifies whether to filter out queries that are not summary-seeking. The
2913
+ # default value is `false`. Google employs search-query classification to detect
2914
+ # summary-seeking queries. No summary is returned if the search query is
2915
+ # classified as a non-summary seeking query. For example, `why is the sky blue`
2916
+ # and `Who is the best soccer player in the world?` are summary-seeking queries,
2917
+ # but `SFO airport` and `world cup 2026` are not. They are most likely
2918
+ # navigational queries. If this field is set to `true`, we skip generating
2919
+ # summaries for non-summary seeking queries and return fallback messages instead.
2920
+ # Corresponds to the JSON property `ignoreNonSummarySeekingQuery`
2921
+ # @return [Boolean]
2922
+ attr_accessor :ignore_non_summary_seeking_query
2923
+ alias_method :ignore_non_summary_seeking_query?, :ignore_non_summary_seeking_query
2924
+
2925
+ # Specifies whether to include citations in the summary. The default value is `
2926
+ # false`. When this field is set to `true`, summaries include in-line citation
2927
+ # numbers. Example summary including citations: BigQuery is Google Cloud's fully
2928
+ # managed and completely serverless enterprise data warehouse [1]. BigQuery
2929
+ # supports all data types, works across clouds, and has built-in machine
2930
+ # learning and business intelligence, all within a unified platform [2, 3]. The
2931
+ # citation numbers refer to the returned search results and are 1-indexed. For
2932
+ # example, [1] means that the sentence is attributed to the first search result.
2933
+ # [2, 3] means that the sentence is attributed to both the second and third
2934
+ # search results.
2935
+ # Corresponds to the JSON property `includeCitations`
2936
+ # @return [Boolean]
2937
+ attr_accessor :include_citations
2938
+ alias_method :include_citations?, :include_citations
2939
+
2940
+ # Language code for Summary. Use language tags defined by [BCP47](https://www.
2941
+ # rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
2942
+ # Corresponds to the JSON property `languageCode`
2943
+ # @return [String]
2944
+ attr_accessor :language_code
2945
+
2946
+ # Specification of the prompt to use with the model.
2947
+ # Corresponds to the JSON property `modelPromptSpec`
2948
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec]
2949
+ attr_accessor :model_prompt_spec
2950
+
2951
+ # Specification of the model.
2952
+ # Corresponds to the JSON property `modelSpec`
2953
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec]
2954
+ attr_accessor :model_spec
2955
+
2956
+ # The number of top results to generate the summary from. If the number of
2957
+ # results returned is less than `summaryResultCount`, the summary is generated
2958
+ # from all of the results. At most 10 results for documents mode, or 50 for
2959
+ # chunks mode, can be used to generate a summary. The chunks mode is used when
2960
+ # SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
2961
+ # Corresponds to the JSON property `summaryResultCount`
2962
+ # @return [Fixnum]
2963
+ attr_accessor :summary_result_count
2964
+
2965
+ # If true, answer will be generated from most relevant chunks from top search
2966
+ # results. This feature will improve summary quality. Note that with this
2967
+ # feature enabled, not all top search results will be referenced and included in
2968
+ # the reference list, so the citation source index only points to the search
2969
+ # results listed in the reference list.
2970
+ # Corresponds to the JSON property `useSemanticChunks`
2971
+ # @return [Boolean]
2972
+ attr_accessor :use_semantic_chunks
2973
+ alias_method :use_semantic_chunks?, :use_semantic_chunks
2974
+
2975
+ def initialize(**args)
2976
+ update!(**args)
2977
+ end
2978
+
2979
+ # Update properties of this object
2980
+ def update!(**args)
2981
+ @ignore_adversarial_query = args[:ignore_adversarial_query] if args.key?(:ignore_adversarial_query)
2982
+ @ignore_jail_breaking_query = args[:ignore_jail_breaking_query] if args.key?(:ignore_jail_breaking_query)
2983
+ @ignore_low_relevant_content = args[:ignore_low_relevant_content] if args.key?(:ignore_low_relevant_content)
2984
+ @ignore_non_summary_seeking_query = args[:ignore_non_summary_seeking_query] if args.key?(:ignore_non_summary_seeking_query)
2985
+ @include_citations = args[:include_citations] if args.key?(:include_citations)
2986
+ @language_code = args[:language_code] if args.key?(:language_code)
2987
+ @model_prompt_spec = args[:model_prompt_spec] if args.key?(:model_prompt_spec)
2988
+ @model_spec = args[:model_spec] if args.key?(:model_spec)
2989
+ @summary_result_count = args[:summary_result_count] if args.key?(:summary_result_count)
2990
+ @use_semantic_chunks = args[:use_semantic_chunks] if args.key?(:use_semantic_chunks)
2991
+ end
2992
+ end
2993
+
2994
+ # Specification of the prompt to use with the model.
2995
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec
2996
+ include Google::Apis::Core::Hashable
2997
+
2998
+ # Text at the beginning of the prompt that instructs the assistant. Examples are
2999
+ # available in the user guide.
3000
+ # Corresponds to the JSON property `preamble`
3001
+ # @return [String]
3002
+ attr_accessor :preamble
3003
+
3004
+ def initialize(**args)
3005
+ update!(**args)
3006
+ end
3007
+
3008
+ # Update properties of this object
3009
+ def update!(**args)
3010
+ @preamble = args[:preamble] if args.key?(:preamble)
3011
+ end
3012
+ end
3013
+
3014
+ # Specification of the model.
3015
+ class GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec
3016
+ include Google::Apis::Core::Hashable
3017
+
3018
+ # The model version used to generate the summary. Supported values are: * `
3019
+ # stable`: string. Default value when no value is specified. Uses a generally
3020
+ # available, fine-tuned model. For more information, see [Answer generation
3021
+ # model versions and lifecycle](https://cloud.google.com/generative-ai-app-
3022
+ # builder/docs/answer-generation-models). * `preview`: string. (Public preview)
3023
+ # Uses a preview model. For more information, see [Answer generation model
3024
+ # versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/
3025
+ # docs/answer-generation-models).
3026
+ # Corresponds to the JSON property `version`
3027
+ # @return [String]
3028
+ attr_accessor :version
3029
+
3030
+ def initialize(**args)
3031
+ update!(**args)
3032
+ end
3033
+
3034
+ # Update properties of this object
3035
+ def update!(**args)
3036
+ @version = args[:version] if args.key?(:version)
3037
+ end
3038
+ end
3039
+
3040
+ # Configures metadata that is used to generate serving time results (e.g. search
3041
+ # results or recommendation predictions). The ServingConfig is passed in the
3042
+ # search and predict request and generates results.
3043
+ class GoogleCloudDiscoveryengineV1ServingConfig
3044
+ include Google::Apis::Core::Hashable
3045
+
3046
+ # Boost controls to use in serving path. All triggered boost controls will be
3047
+ # applied. Boost controls must be in the same data store as the serving config.
3048
+ # Maximum of 20 boost controls.
3049
+ # Corresponds to the JSON property `boostControlIds`
3050
+ # @return [Array<String>]
3051
+ attr_accessor :boost_control_ids
3052
+
3053
+ # Output only. ServingConfig created timestamp.
3054
+ # Corresponds to the JSON property `createTime`
3055
+ # @return [String]
3056
+ attr_accessor :create_time
3057
+
3058
+ # Required. The human readable serving config display name. Used in Discovery UI.
3059
+ # This field must be a UTF-8 encoded string with a length limit of 128
3060
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
3061
+ # Corresponds to the JSON property `displayName`
3062
+ # @return [String]
3063
+ attr_accessor :display_name
3064
+
3065
+ # Condition do not associate specifications. If multiple do not associate
3066
+ # conditions match, all matching do not associate controls in the list will
3067
+ # execute. Order does not matter. Maximum number of specifications is 100. Can
3068
+ # only be set if SolutionType is SOLUTION_TYPE_SEARCH.
3069
+ # Corresponds to the JSON property `dissociateControlIds`
3070
+ # @return [Array<String>]
3071
+ attr_accessor :dissociate_control_ids
3072
+
3073
+ # How much diversity to use in recommendation model results e.g. `medium-
3074
+ # diversity` or `high-diversity`. Currently supported values: * `no-diversity` *
3075
+ # `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If
3076
+ # not specified, we choose default based on recommendation model type. Default
3077
+ # value: `no-diversity`. Can only be set if SolutionType is
3078
+ # SOLUTION_TYPE_RECOMMENDATION.
3079
+ # Corresponds to the JSON property `diversityLevel`
3080
+ # @return [String]
3081
+ attr_accessor :diversity_level
3082
+
3083
+ # Filter controls to use in serving path. All triggered filter controls will be
3084
+ # applied. Filter controls must be in the same data store as the serving config.
3085
+ # Maximum of 20 filter controls.
3086
+ # Corresponds to the JSON property `filterControlIds`
3087
+ # @return [Array<String>]
3088
+ attr_accessor :filter_control_ids
3089
+
3090
+ # Specifies the configurations needed for Generic Discovery.Currently we support:
3091
+ # * `content_search_spec`: configuration for generic content search.
3092
+ # Corresponds to the JSON property `genericConfig`
3093
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1ServingConfigGenericConfig]
3094
+ attr_accessor :generic_config
3095
+
3096
+ # Condition ignore specifications. If multiple ignore conditions match, all
3097
+ # matching ignore controls in the list will execute. Order does not matter.
3098
+ # Maximum number of specifications is 100.
3099
+ # Corresponds to the JSON property `ignoreControlIds`
3100
+ # @return [Array<String>]
3101
+ attr_accessor :ignore_control_ids
3102
+
3103
+ # Specifies the configurations needed for Media Discovery. Currently we support:
3104
+ # * `demote_content_watched`: Threshold for watched content demotion. Customers
3105
+ # can specify if using watched content demotion or use viewed detail page. Using
3106
+ # the content watched demotion, customers need to specify the watched minutes or
3107
+ # percentage exceeds the threshold, the content will be demoted in the
3108
+ # recommendation result. * `promote_fresh_content`: cutoff days for fresh
3109
+ # content promotion. Customers can specify if using content freshness promotion.
3110
+ # If the content was published within the cutoff days, the content will be
3111
+ # promoted in the recommendation result. Can only be set if SolutionType is
3112
+ # SOLUTION_TYPE_RECOMMENDATION.
3113
+ # Corresponds to the JSON property `mediaConfig`
3114
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1ServingConfigMediaConfig]
3115
+ attr_accessor :media_config
3116
+
3117
+ # The id of the model to use at serving time. Currently only
3118
+ # RecommendationModels are supported. Can be changed but only to a compatible
3119
+ # model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
3120
+ # SolutionType is SOLUTION_TYPE_RECOMMENDATION.
3121
+ # Corresponds to the JSON property `modelId`
3122
+ # @return [String]
3123
+ attr_accessor :model_id
3124
+
3125
+ # Immutable. Fully qualified name `projects/`project`/locations/`location`/
3126
+ # collections/`collection_id`/engines/`engine_id`/servingConfigs/`
3127
+ # serving_config_id``
3128
+ # Corresponds to the JSON property `name`
3129
+ # @return [String]
3130
+ attr_accessor :name
3131
+
3132
+ # Condition oneway synonyms specifications. If multiple oneway synonyms
3133
+ # conditions match, all matching oneway synonyms controls in the list will
3134
+ # execute. Maximum number of specifications is 100. Can only be set if
3135
+ # SolutionType is SOLUTION_TYPE_SEARCH.
3136
+ # Corresponds to the JSON property `onewaySynonymsControlIds`
3137
+ # @return [Array<String>]
3138
+ attr_accessor :oneway_synonyms_control_ids
3139
+
3140
+ # Condition promote specifications. Maximum number of specifications is 100.
3141
+ # Corresponds to the JSON property `promoteControlIds`
3142
+ # @return [Array<String>]
3143
+ attr_accessor :promote_control_ids
3144
+
3145
+ # The ranking expression controls the customized ranking on retrieval documents.
3146
+ # To leverage this, document embedding is required. The ranking expression
3147
+ # setting in ServingConfig applies to all search requests served by the serving
3148
+ # config. However, if SearchRequest.ranking_expression is specified, it
3149
+ # overrides the ServingConfig ranking expression. The ranking expression is a
3150
+ # single function or multiple functions that are joined by "+". *
3151
+ # ranking_expression = function, ` " + ", function `; Supported functions: *
3152
+ # double * relevance_score * double * dotProduct(embedding_field_path) Function
3153
+ # variables: * `relevance_score`: pre-defined keywords, used for measure
3154
+ # relevance between query and document. * `embedding_field_path`: the document
3155
+ # embedding field used with query embedding vector. * `dotProduct`: embedding
3156
+ # function between embedding_field_path and query embedding vector. Example
3157
+ # ranking expression: If document has an embedding field doc_embedding, the
3158
+ # ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(
3159
+ # doc_embedding)`.
3160
+ # Corresponds to the JSON property `rankingExpression`
3161
+ # @return [String]
3162
+ attr_accessor :ranking_expression
3163
+
3164
+ # IDs of the redirect controls. Only the first triggered redirect action is
3165
+ # applied, even if multiple apply. Maximum number of specifications is 100. Can
3166
+ # only be set if SolutionType is SOLUTION_TYPE_SEARCH.
3167
+ # Corresponds to the JSON property `redirectControlIds`
3168
+ # @return [Array<String>]
3169
+ attr_accessor :redirect_control_ids
3170
+
3171
+ # Condition replacement specifications. Applied according to the order in the
3172
+ # list. A previously replaced term can not be re-replaced. Maximum number of
3173
+ # specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
3174
+ # Corresponds to the JSON property `replacementControlIds`
3175
+ # @return [Array<String>]
3176
+ attr_accessor :replacement_control_ids
3177
+
3178
+ # Required. Immutable. Specifies the solution type that a serving config can be
3179
+ # associated with.
3180
+ # Corresponds to the JSON property `solutionType`
3181
+ # @return [String]
3182
+ attr_accessor :solution_type
3183
+
3184
+ # Condition synonyms specifications. If multiple synonyms conditions match, all
3185
+ # matching synonyms controls in the list will execute. Maximum number of
3186
+ # specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
3187
+ # Corresponds to the JSON property `synonymsControlIds`
3188
+ # @return [Array<String>]
3189
+ attr_accessor :synonyms_control_ids
3190
+
3191
+ # Output only. ServingConfig updated timestamp.
3192
+ # Corresponds to the JSON property `updateTime`
3193
+ # @return [String]
3194
+ attr_accessor :update_time
3195
+
3196
+ def initialize(**args)
3197
+ update!(**args)
3198
+ end
3199
+
3200
+ # Update properties of this object
3201
+ def update!(**args)
3202
+ @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
3203
+ @create_time = args[:create_time] if args.key?(:create_time)
3204
+ @display_name = args[:display_name] if args.key?(:display_name)
3205
+ @dissociate_control_ids = args[:dissociate_control_ids] if args.key?(:dissociate_control_ids)
3206
+ @diversity_level = args[:diversity_level] if args.key?(:diversity_level)
3207
+ @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
3208
+ @generic_config = args[:generic_config] if args.key?(:generic_config)
3209
+ @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
3210
+ @media_config = args[:media_config] if args.key?(:media_config)
3211
+ @model_id = args[:model_id] if args.key?(:model_id)
3212
+ @name = args[:name] if args.key?(:name)
3213
+ @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
3214
+ @promote_control_ids = args[:promote_control_ids] if args.key?(:promote_control_ids)
3215
+ @ranking_expression = args[:ranking_expression] if args.key?(:ranking_expression)
3216
+ @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
3217
+ @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
3218
+ @solution_type = args[:solution_type] if args.key?(:solution_type)
3219
+ @synonyms_control_ids = args[:synonyms_control_ids] if args.key?(:synonyms_control_ids)
3220
+ @update_time = args[:update_time] if args.key?(:update_time)
3221
+ end
3222
+ end
3223
+
3224
+ # Specifies the configurations needed for Generic Discovery.Currently we support:
3225
+ # * `content_search_spec`: configuration for generic content search.
3226
+ class GoogleCloudDiscoveryengineV1ServingConfigGenericConfig
3227
+ include Google::Apis::Core::Hashable
3228
+
3229
+ # A specification for configuring the behavior of content search.
3230
+ # Corresponds to the JSON property `contentSearchSpec`
3231
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec]
3232
+ attr_accessor :content_search_spec
3233
+
3234
+ def initialize(**args)
3235
+ update!(**args)
3236
+ end
3237
+
3238
+ # Update properties of this object
3239
+ def update!(**args)
3240
+ @content_search_spec = args[:content_search_spec] if args.key?(:content_search_spec)
3241
+ end
3242
+ end
3243
+
3244
+ # Specifies the configurations needed for Media Discovery. Currently we support:
3245
+ # * `demote_content_watched`: Threshold for watched content demotion. Customers
3246
+ # can specify if using watched content demotion or use viewed detail page. Using
3247
+ # the content watched demotion, customers need to specify the watched minutes or
3248
+ # percentage exceeds the threshold, the content will be demoted in the
3249
+ # recommendation result. * `promote_fresh_content`: cutoff days for fresh
3250
+ # content promotion. Customers can specify if using content freshness promotion.
3251
+ # If the content was published within the cutoff days, the content will be
3252
+ # promoted in the recommendation result. Can only be set if SolutionType is
3253
+ # SOLUTION_TYPE_RECOMMENDATION.
3254
+ class GoogleCloudDiscoveryengineV1ServingConfigMediaConfig
3255
+ include Google::Apis::Core::Hashable
3256
+
3257
+ # Specifies the content freshness used for recommendation result. Contents will
3258
+ # be demoted if contents were published for more than content freshness cutoff
3259
+ # days.
3260
+ # Corresponds to the JSON property `contentFreshnessCutoffDays`
3261
+ # @return [Fixnum]
3262
+ attr_accessor :content_freshness_cutoff_days
3263
+
3264
+ # Specifies the content watched percentage threshold for demotion. Threshold
3265
+ # value must be between [0, 1.0] inclusive.
3266
+ # Corresponds to the JSON property `contentWatchedPercentageThreshold`
3267
+ # @return [Float]
3268
+ attr_accessor :content_watched_percentage_threshold
3269
+
3270
+ # Specifies the content watched minutes threshold for demotion.
3271
+ # Corresponds to the JSON property `contentWatchedSecondsThreshold`
3272
+ # @return [Float]
3273
+ attr_accessor :content_watched_seconds_threshold
3274
+
3275
+ # Optional. Specifies the number of days to look back for demoting watched
3276
+ # content. If set to zero or unset, defaults to the maximum of 365 days.
3277
+ # Corresponds to the JSON property `demoteContentWatchedPastDays`
3278
+ # @return [Fixnum]
3279
+ attr_accessor :demote_content_watched_past_days
3280
+
3281
+ # Specifies the event type used for demoting recommendation result. Currently
3282
+ # supported values: * `view-item`: Item viewed. * `media-play`: Start/resume
3283
+ # watching a video, playing a song, etc. * `media-complete`: Finished or stopped
3284
+ # midway through a video, song, etc. If unset, watch history demotion will not
3285
+ # be applied. Content freshness demotion will still be applied.
3286
+ # Corresponds to the JSON property `demotionEventType`
3287
+ # @return [String]
3288
+ attr_accessor :demotion_event_type
3289
+
3290
+ def initialize(**args)
3291
+ update!(**args)
3292
+ end
3293
+
3294
+ # Update properties of this object
3295
+ def update!(**args)
3296
+ @content_freshness_cutoff_days = args[:content_freshness_cutoff_days] if args.key?(:content_freshness_cutoff_days)
3297
+ @content_watched_percentage_threshold = args[:content_watched_percentage_threshold] if args.key?(:content_watched_percentage_threshold)
3298
+ @content_watched_seconds_threshold = args[:content_watched_seconds_threshold] if args.key?(:content_watched_seconds_threshold)
3299
+ @demote_content_watched_past_days = args[:demote_content_watched_past_days] if args.key?(:demote_content_watched_past_days)
3300
+ @demotion_event_type = args[:demotion_event_type] if args.key?(:demotion_event_type)
3301
+ end
3302
+ end
3303
+
2700
3304
  # Verification information for target sites in advanced site search.
2701
3305
  class GoogleCloudDiscoveryengineV1SiteVerificationInfo
2702
3306
  include Google::Apis::Core::Hashable
@@ -3128,6 +3732,17 @@ module Google
3128
3732
  # @return [String]
3129
3733
  attr_accessor :create_time
3130
3734
 
3735
+ # A score in the range of [0, 1] describing how grounded the answer is by the
3736
+ # reference chunks.
3737
+ # Corresponds to the JSON property `groundingScore`
3738
+ # @return [Float]
3739
+ attr_accessor :grounding_score
3740
+
3741
+ # Optional. Grounding supports.
3742
+ # Corresponds to the JSON property `groundingSupports`
3743
+ # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport>]
3744
+ attr_accessor :grounding_supports
3745
+
3131
3746
  # Immutable. Fully qualified name `projects/`project`/locations/global/
3132
3747
  # collections/`collection`/engines/`engine`/sessions/*/answers/*`
3133
3748
  # Corresponds to the JSON property `name`
@@ -3170,6 +3785,8 @@ module Google
3170
3785
  @citations = args[:citations] if args.key?(:citations)
3171
3786
  @complete_time = args[:complete_time] if args.key?(:complete_time)
3172
3787
  @create_time = args[:create_time] if args.key?(:create_time)
3788
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
3789
+ @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
3173
3790
  @name = args[:name] if args.key?(:name)
3174
3791
  @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
3175
3792
  @references = args[:references] if args.key?(:references)
@@ -3229,6 +3846,56 @@ module Google
3229
3846
  end
3230
3847
  end
3231
3848
 
3849
+ # Grounding support for a claim in `answer_text`.
3850
+ class GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport
3851
+ include Google::Apis::Core::Hashable
3852
+
3853
+ # Required. End of the claim, exclusive.
3854
+ # Corresponds to the JSON property `endIndex`
3855
+ # @return [Fixnum]
3856
+ attr_accessor :end_index
3857
+
3858
+ # Indicates that this claim required grounding check. When the system decided
3859
+ # this claim didn't require attribution/grounding check, this field is set to
3860
+ # false. In that case, no grounding check was done for the claim and therefore `
3861
+ # grounding_score`, `sources` is not returned.
3862
+ # Corresponds to the JSON property `groundingCheckRequired`
3863
+ # @return [Boolean]
3864
+ attr_accessor :grounding_check_required
3865
+ alias_method :grounding_check_required?, :grounding_check_required
3866
+
3867
+ # A score in the range of [0, 1] describing how grounded is a specific claim by
3868
+ # the references. Higher value means that the claim is better supported by the
3869
+ # reference chunks.
3870
+ # Corresponds to the JSON property `groundingScore`
3871
+ # @return [Float]
3872
+ attr_accessor :grounding_score
3873
+
3874
+ # Optional. Citation sources for the claim.
3875
+ # Corresponds to the JSON property `sources`
3876
+ # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaAnswerCitationSource>]
3877
+ attr_accessor :sources
3878
+
3879
+ # Required. Index indicates the start of the claim, measured in bytes (UTF-8
3880
+ # unicode).
3881
+ # Corresponds to the JSON property `startIndex`
3882
+ # @return [Fixnum]
3883
+ attr_accessor :start_index
3884
+
3885
+ def initialize(**args)
3886
+ update!(**args)
3887
+ end
3888
+
3889
+ # Update properties of this object
3890
+ def update!(**args)
3891
+ @end_index = args[:end_index] if args.key?(:end_index)
3892
+ @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
3893
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
3894
+ @sources = args[:sources] if args.key?(:sources)
3895
+ @start_index = args[:start_index] if args.key?(:start_index)
3896
+ end
3897
+ end
3898
+
3232
3899
  # Query understanding information.
3233
3900
  class GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo
3234
3901
  include Google::Apis::Core::Hashable
@@ -4271,97 +4938,39 @@ module Google
4271
4938
  # CreateTargetSite operation. This will be returned by the google.longrunning.
4272
4939
  # Operation.metadata field.
4273
4940
  class GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata
4274
- include Google::Apis::Core::Hashable
4275
-
4276
- # Operation create time.
4277
- # Corresponds to the JSON property `createTime`
4278
- # @return [String]
4279
- attr_accessor :create_time
4280
-
4281
- # Operation last update time. If the operation is done, this is also the finish
4282
- # time.
4283
- # Corresponds to the JSON property `updateTime`
4284
- # @return [String]
4285
- attr_accessor :update_time
4286
-
4287
- def initialize(**args)
4288
- update!(**args)
4289
- end
4290
-
4291
- # Update properties of this object
4292
- def update!(**args)
4293
- @create_time = args[:create_time] if args.key?(:create_time)
4294
- @update_time = args[:update_time] if args.key?(:update_time)
4295
- end
4296
- end
4297
-
4298
- # Defines custom fine tuning spec.
4299
- class GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec
4300
- include Google::Apis::Core::Hashable
4301
-
4302
- # Whether or not to enable and include custom fine tuned search adaptor model.
4303
- # Corresponds to the JSON property `enableSearchAdaptor`
4304
- # @return [Boolean]
4305
- attr_accessor :enable_search_adaptor
4306
- alias_method :enable_search_adaptor?, :enable_search_adaptor
4307
-
4308
- def initialize(**args)
4309
- update!(**args)
4310
- end
4311
-
4312
- # Update properties of this object
4313
- def update!(**args)
4314
- @enable_search_adaptor = args[:enable_search_adaptor] if args.key?(:enable_search_adaptor)
4315
- end
4316
- end
4317
-
4318
- # Metadata that describes a custom tuned model.
4319
- class GoogleCloudDiscoveryengineV1alphaCustomTuningModel
4320
- include Google::Apis::Core::Hashable
4321
-
4322
- # Deprecated: Timestamp the Model was created at.
4323
- # Corresponds to the JSON property `createTime`
4324
- # @return [String]
4325
- attr_accessor :create_time
4326
-
4327
- # The display name of the model.
4328
- # Corresponds to the JSON property `displayName`
4329
- # @return [String]
4330
- attr_accessor :display_name
4941
+ include Google::Apis::Core::Hashable
4331
4942
 
4332
- # Currently this is only populated if the model state is `
4333
- # INPUT_VALIDATION_FAILED`.
4334
- # Corresponds to the JSON property `errorMessage`
4943
+ # Operation create time.
4944
+ # Corresponds to the JSON property `createTime`
4335
4945
  # @return [String]
4336
- attr_accessor :error_message
4337
-
4338
- # The metrics of the trained model.
4339
- # Corresponds to the JSON property `metrics`
4340
- # @return [Hash<String,Float>]
4341
- attr_accessor :metrics
4946
+ attr_accessor :create_time
4342
4947
 
4343
- # The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).
4344
- # Corresponds to the JSON property `modelState`
4948
+ # Operation last update time. If the operation is done, this is also the finish
4949
+ # time.
4950
+ # Corresponds to the JSON property `updateTime`
4345
4951
  # @return [String]
4346
- attr_accessor :model_state
4952
+ attr_accessor :update_time
4347
4953
 
4348
- # The version of the model.
4349
- # Corresponds to the JSON property `modelVersion`
4350
- # @return [Fixnum]
4351
- attr_accessor :model_version
4954
+ def initialize(**args)
4955
+ update!(**args)
4956
+ end
4352
4957
 
4353
- # Required. The fully qualified resource name of the model. Format: `projects/`
4354
- # project`/locations/`location`/collections/`collection`/dataStores/`data_store`/
4355
- # customTuningModels/`custom_tuning_model``. Model must be an alpha-numerical
4356
- # string with limit of 40 characters.
4357
- # Corresponds to the JSON property `name`
4358
- # @return [String]
4359
- attr_accessor :name
4958
+ # Update properties of this object
4959
+ def update!(**args)
4960
+ @create_time = args[:create_time] if args.key?(:create_time)
4961
+ @update_time = args[:update_time] if args.key?(:update_time)
4962
+ end
4963
+ end
4360
4964
 
4361
- # Timestamp the model training was initiated.
4362
- # Corresponds to the JSON property `trainingStartTime`
4363
- # @return [String]
4364
- attr_accessor :training_start_time
4965
+ # Defines custom fine tuning spec.
4966
+ class GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec
4967
+ include Google::Apis::Core::Hashable
4968
+
4969
+ # Whether or not to enable and include custom fine tuned search adaptor model.
4970
+ # Corresponds to the JSON property `enableSearchAdaptor`
4971
+ # @return [Boolean]
4972
+ attr_accessor :enable_search_adaptor
4973
+ alias_method :enable_search_adaptor?, :enable_search_adaptor
4365
4974
 
4366
4975
  def initialize(**args)
4367
4976
  update!(**args)
@@ -4369,14 +4978,7 @@ module Google
4369
4978
 
4370
4979
  # Update properties of this object
4371
4980
  def update!(**args)
4372
- @create_time = args[:create_time] if args.key?(:create_time)
4373
- @display_name = args[:display_name] if args.key?(:display_name)
4374
- @error_message = args[:error_message] if args.key?(:error_message)
4375
- @metrics = args[:metrics] if args.key?(:metrics)
4376
- @model_state = args[:model_state] if args.key?(:model_state)
4377
- @model_version = args[:model_version] if args.key?(:model_version)
4378
- @name = args[:name] if args.key?(:name)
4379
- @training_start_time = args[:training_start_time] if args.key?(:training_start_time)
4981
+ @enable_search_adaptor = args[:enable_search_adaptor] if args.key?(:enable_search_adaptor)
4380
4982
  end
4381
4983
  end
4382
4984
 
@@ -4704,6 +5306,27 @@ module Google
4704
5306
  end
4705
5307
  end
4706
5308
 
5309
+ # Request for DeleteSession method.
5310
+ class GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest
5311
+ include Google::Apis::Core::Hashable
5312
+
5313
+ # Required. The resource name of the Session to delete. Format: `projects/`
5314
+ # project`/locations/`location`/collections/`collection`/dataStores/`
5315
+ # data_store_id`/sessions/`session_id``
5316
+ # Corresponds to the JSON property `name`
5317
+ # @return [String]
5318
+ attr_accessor :name
5319
+
5320
+ def initialize(**args)
5321
+ update!(**args)
5322
+ end
5323
+
5324
+ # Update properties of this object
5325
+ def update!(**args)
5326
+ @name = args[:name] if args.key?(:name)
5327
+ end
5328
+ end
5329
+
4707
5330
  # Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap
4708
5331
  # operation. This will be returned by the google.longrunning.Operation.metadata
4709
5332
  # field.
@@ -5071,8 +5694,8 @@ module Google
5071
5694
  attr_accessor :display_name
5072
5695
 
5073
5696
  # The industry vertical that the engine registers. The restriction of the Engine
5074
- # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
5075
- # Vertical on Engine has to match vertical of the DataStore linked to the engine.
5697
+ # industry vertical is based on DataStore: Vertical on Engine has to match
5698
+ # vertical of the DataStore linked to the engine.
5076
5699
  # Corresponds to the JSON property `industryVertical`
5077
5700
  # @return [String]
5078
5701
  attr_accessor :industry_vertical
@@ -5772,6 +6395,35 @@ module Google
5772
6395
  end
5773
6396
  end
5774
6397
 
6398
+ # Request for GetSession method.
6399
+ class GoogleCloudDiscoveryengineV1alphaGetSessionRequest
6400
+ include Google::Apis::Core::Hashable
6401
+
6402
+ # Optional. If set to true, the full session including all answer details will
6403
+ # be returned.
6404
+ # Corresponds to the JSON property `includeAnswerDetails`
6405
+ # @return [Boolean]
6406
+ attr_accessor :include_answer_details
6407
+ alias_method :include_answer_details?, :include_answer_details
6408
+
6409
+ # Required. The resource name of the Session to get. Format: `projects/`project`/
6410
+ # locations/`location`/collections/`collection`/dataStores/`data_store_id`/
6411
+ # sessions/`session_id``
6412
+ # Corresponds to the JSON property `name`
6413
+ # @return [String]
6414
+ attr_accessor :name
6415
+
6416
+ def initialize(**args)
6417
+ update!(**args)
6418
+ end
6419
+
6420
+ # Update properties of this object
6421
+ def update!(**args)
6422
+ @include_answer_details = args[:include_answer_details] if args.key?(:include_answer_details)
6423
+ @name = args[:name] if args.key?(:name)
6424
+ end
6425
+ end
6426
+
5775
6427
  # Response message for SiteSearchEngineService.GetUriPatternDocumentData method.
5776
6428
  class GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse
5777
6429
  include Google::Apis::Core::Hashable
@@ -6283,14 +6935,42 @@ module Google
6283
6935
  end
6284
6936
  end
6285
6937
 
6286
- # Response message for SearchTuningService.ListCustomModels method.
6287
- class GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse
6938
+ # Request for ListSessions method.
6939
+ class GoogleCloudDiscoveryengineV1alphaListSessionsRequest
6288
6940
  include Google::Apis::Core::Hashable
6289
6941
 
6290
- # List of custom tuning models.
6291
- # Corresponds to the JSON property `models`
6292
- # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaCustomTuningModel>]
6293
- attr_accessor :models
6942
+ # A filter to apply on the list results. The supported features are:
6943
+ # user_pseudo_id, state. Example: "user_pseudo_id = some_id"
6944
+ # Corresponds to the JSON property `filter`
6945
+ # @return [String]
6946
+ attr_accessor :filter
6947
+
6948
+ # A comma-separated list of fields to order by, sorted in ascending order. Use "
6949
+ # desc" after a field name for descending. Supported fields: * `update_time` * `
6950
+ # create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "
6951
+ # create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned
6952
+ # first, then by update_time.
6953
+ # Corresponds to the JSON property `orderBy`
6954
+ # @return [String]
6955
+ attr_accessor :order_by
6956
+
6957
+ # Maximum number of results to return. If unspecified, defaults to 50. Max
6958
+ # allowed value is 1000.
6959
+ # Corresponds to the JSON property `pageSize`
6960
+ # @return [Fixnum]
6961
+ attr_accessor :page_size
6962
+
6963
+ # A page token, received from a previous `ListSessions` call. Provide this to
6964
+ # retrieve the subsequent page.
6965
+ # Corresponds to the JSON property `pageToken`
6966
+ # @return [String]
6967
+ attr_accessor :page_token
6968
+
6969
+ # Required. The data store resource name. Format: `projects/`project`/locations/`
6970
+ # location`/collections/`collection`/dataStores/`data_store_id``
6971
+ # Corresponds to the JSON property `parent`
6972
+ # @return [String]
6973
+ attr_accessor :parent
6294
6974
 
6295
6975
  def initialize(**args)
6296
6976
  update!(**args)
@@ -6298,7 +6978,36 @@ module Google
6298
6978
 
6299
6979
  # Update properties of this object
6300
6980
  def update!(**args)
6301
- @models = args[:models] if args.key?(:models)
6981
+ @filter = args[:filter] if args.key?(:filter)
6982
+ @order_by = args[:order_by] if args.key?(:order_by)
6983
+ @page_size = args[:page_size] if args.key?(:page_size)
6984
+ @page_token = args[:page_token] if args.key?(:page_token)
6985
+ @parent = args[:parent] if args.key?(:parent)
6986
+ end
6987
+ end
6988
+
6989
+ # Response for ListSessions method.
6990
+ class GoogleCloudDiscoveryengineV1alphaListSessionsResponse
6991
+ include Google::Apis::Core::Hashable
6992
+
6993
+ # Pagination token, if not returned indicates the last page.
6994
+ # Corresponds to the JSON property `nextPageToken`
6995
+ # @return [String]
6996
+ attr_accessor :next_page_token
6997
+
6998
+ # All the Sessions for a given data store.
6999
+ # Corresponds to the JSON property `sessions`
7000
+ # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaSession>]
7001
+ attr_accessor :sessions
7002
+
7003
+ def initialize(**args)
7004
+ update!(**args)
7005
+ end
7006
+
7007
+ # Update properties of this object
7008
+ def update!(**args)
7009
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
7010
+ @sessions = args[:sessions] if args.key?(:sessions)
6302
7011
  end
6303
7012
  end
6304
7013
 
@@ -7904,6 +8613,11 @@ module Google
7904
8613
  class GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec
7905
8614
  include Google::Apis::Core::Hashable
7906
8615
 
8616
+ # Boost specification to boost certain documents.
8617
+ # Corresponds to the JSON property `boostSpec`
8618
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec]
8619
+ attr_accessor :boost_spec
8620
+
7907
8621
  # Required. Full resource name of DataStore, such as `projects/`project`/
7908
8622
  # locations/`location`/collections/`collection_id`/dataStores/`data_store_id``.
7909
8623
  # Corresponds to the JSON property `dataStore`
@@ -7923,6 +8637,7 @@ module Google
7923
8637
 
7924
8638
  # Update properties of this object
7925
8639
  def update!(**args)
8640
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
7926
8641
  @data_store = args[:data_store] if args.key?(:data_store)
7927
8642
  @filter = args[:filter] if args.key?(:filter)
7928
8643
  end
@@ -8305,11 +9020,25 @@ module Google
8305
9020
  class GoogleCloudDiscoveryengineV1alphaSession
8306
9021
  include Google::Apis::Core::Hashable
8307
9022
 
9023
+ # Optional. The display name of the session. This field is used to identify the
9024
+ # session in the UI. By default, the display name is the first turn query text
9025
+ # in the session.
9026
+ # Corresponds to the JSON property `displayName`
9027
+ # @return [String]
9028
+ attr_accessor :display_name
9029
+
8308
9030
  # Output only. The time the session finished.
8309
9031
  # Corresponds to the JSON property `endTime`
8310
9032
  # @return [String]
8311
9033
  attr_accessor :end_time
8312
9034
 
9035
+ # Optional. Whether the session is pinned, pinned session will be displayed on
9036
+ # the top of the session list.
9037
+ # Corresponds to the JSON property `isPinned`
9038
+ # @return [Boolean]
9039
+ attr_accessor :is_pinned
9040
+ alias_method :is_pinned?, :is_pinned
9041
+
8313
9042
  # Immutable. Fully qualified name `projects/`project`/locations/global/
8314
9043
  # collections/`collection`/engines/`engine`/sessions/*`
8315
9044
  # Corresponds to the JSON property `name`
@@ -8342,7 +9071,9 @@ module Google
8342
9071
 
8343
9072
  # Update properties of this object
8344
9073
  def update!(**args)
9074
+ @display_name = args[:display_name] if args.key?(:display_name)
8345
9075
  @end_time = args[:end_time] if args.key?(:end_time)
9076
+ @is_pinned = args[:is_pinned] if args.key?(:is_pinned)
8346
9077
  @name = args[:name] if args.key?(:name)
8347
9078
  @start_time = args[:start_time] if args.key?(:start_time)
8348
9079
  @state = args[:state] if args.key?(:state)
@@ -8769,6 +9500,33 @@ module Google
8769
9500
  end
8770
9501
  end
8771
9502
 
9503
+ # Request for UpdateSession method.
9504
+ class GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest
9505
+ include Google::Apis::Core::Hashable
9506
+
9507
+ # External session proto definition.
9508
+ # Corresponds to the JSON property `session`
9509
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaSession]
9510
+ attr_accessor :session
9511
+
9512
+ # Indicates which fields in the provided Session to update. The following are
9513
+ # NOT supported: * Session.name If not set or empty, all supported fields are
9514
+ # updated.
9515
+ # Corresponds to the JSON property `updateMask`
9516
+ # @return [String]
9517
+ attr_accessor :update_mask
9518
+
9519
+ def initialize(**args)
9520
+ update!(**args)
9521
+ end
9522
+
9523
+ # Update properties of this object
9524
+ def update!(**args)
9525
+ @session = args[:session] if args.key?(:session)
9526
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
9527
+ end
9528
+ end
9529
+
8772
9530
  # Metadata related to the progress of the SiteSearchEngineService.
8773
9531
  # UpdateTargetSite operation. This will be returned by the google.longrunning.
8774
9532
  # Operation.metadata field.
@@ -9292,6 +10050,17 @@ module Google
9292
10050
  # @return [String]
9293
10051
  attr_accessor :create_time
9294
10052
 
10053
+ # A score in the range of [0, 1] describing how grounded the answer is by the
10054
+ # reference chunks.
10055
+ # Corresponds to the JSON property `groundingScore`
10056
+ # @return [Float]
10057
+ attr_accessor :grounding_score
10058
+
10059
+ # Optional. Grounding supports.
10060
+ # Corresponds to the JSON property `groundingSupports`
10061
+ # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport>]
10062
+ attr_accessor :grounding_supports
10063
+
9295
10064
  # Immutable. Fully qualified name `projects/`project`/locations/global/
9296
10065
  # collections/`collection`/engines/`engine`/sessions/*/answers/*`
9297
10066
  # Corresponds to the JSON property `name`
@@ -9334,6 +10103,8 @@ module Google
9334
10103
  @citations = args[:citations] if args.key?(:citations)
9335
10104
  @complete_time = args[:complete_time] if args.key?(:complete_time)
9336
10105
  @create_time = args[:create_time] if args.key?(:create_time)
10106
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
10107
+ @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
9337
10108
  @name = args[:name] if args.key?(:name)
9338
10109
  @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
9339
10110
  @references = args[:references] if args.key?(:references)
@@ -9393,6 +10164,56 @@ module Google
9393
10164
  end
9394
10165
  end
9395
10166
 
10167
+ # Grounding support for a claim in `answer_text`.
10168
+ class GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport
10169
+ include Google::Apis::Core::Hashable
10170
+
10171
+ # Required. End of the claim, exclusive.
10172
+ # Corresponds to the JSON property `endIndex`
10173
+ # @return [Fixnum]
10174
+ attr_accessor :end_index
10175
+
10176
+ # Indicates that this claim required grounding check. When the system decided
10177
+ # this claim didn't require attribution/grounding check, this field is set to
10178
+ # false. In that case, no grounding check was done for the claim and therefore `
10179
+ # grounding_score`, `sources` is not returned.
10180
+ # Corresponds to the JSON property `groundingCheckRequired`
10181
+ # @return [Boolean]
10182
+ attr_accessor :grounding_check_required
10183
+ alias_method :grounding_check_required?, :grounding_check_required
10184
+
10185
+ # A score in the range of [0, 1] describing how grounded is a specific claim by
10186
+ # the references. Higher value means that the claim is better supported by the
10187
+ # reference chunks.
10188
+ # Corresponds to the JSON property `groundingScore`
10189
+ # @return [Float]
10190
+ attr_accessor :grounding_score
10191
+
10192
+ # Optional. Citation sources for the claim.
10193
+ # Corresponds to the JSON property `sources`
10194
+ # @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerCitationSource>]
10195
+ attr_accessor :sources
10196
+
10197
+ # Required. Index indicates the start of the claim, measured in bytes (UTF-8
10198
+ # unicode).
10199
+ # Corresponds to the JSON property `startIndex`
10200
+ # @return [Fixnum]
10201
+ attr_accessor :start_index
10202
+
10203
+ def initialize(**args)
10204
+ update!(**args)
10205
+ end
10206
+
10207
+ # Update properties of this object
10208
+ def update!(**args)
10209
+ @end_index = args[:end_index] if args.key?(:end_index)
10210
+ @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
10211
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
10212
+ @sources = args[:sources] if args.key?(:sources)
10213
+ @start_index = args[:start_index] if args.key?(:start_index)
10214
+ end
10215
+ end
10216
+
9396
10217
  # Request message for ConversationalSearchService.AnswerQuery method.
9397
10218
  class GoogleCloudDiscoveryengineV1betaAnswerQueryRequest
9398
10219
  include Google::Apis::Core::Hashable
@@ -9433,7 +10254,10 @@ module Google
9433
10254
  # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec]
9434
10255
  attr_accessor :related_questions_spec
9435
10256
 
9436
- # Safety specification.
10257
+ # Safety specification. There are two use cases: 1. when only safety_spec.enable
10258
+ # is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.
10259
+ # 2. when safety_spec.enable is set and some safety_settings are set, only
10260
+ # specified safety_settings are applied.
9437
10261
  # Corresponds to the JSON property `safetySpec`
9438
10262
  # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec]
9439
10263
  attr_accessor :safety_spec
@@ -9714,6 +10538,11 @@ module Google
9714
10538
  # @return [Fixnum]
9715
10539
  attr_accessor :max_rephrase_steps
9716
10540
 
10541
+ # Query Rephraser Model specification.
10542
+ # Corresponds to the JSON property `modelSpec`
10543
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec]
10544
+ attr_accessor :model_spec
10545
+
9717
10546
  def initialize(**args)
9718
10547
  update!(**args)
9719
10548
  end
@@ -9722,6 +10551,27 @@ module Google
9722
10551
  def update!(**args)
9723
10552
  @disable = args[:disable] if args.key?(:disable)
9724
10553
  @max_rephrase_steps = args[:max_rephrase_steps] if args.key?(:max_rephrase_steps)
10554
+ @model_spec = args[:model_spec] if args.key?(:model_spec)
10555
+ end
10556
+ end
10557
+
10558
+ # Query Rephraser Model specification.
10559
+ class GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec
10560
+ include Google::Apis::Core::Hashable
10561
+
10562
+ # Optional. Enabled query rephraser model type. If not set, it will use LARGE by
10563
+ # default.
10564
+ # Corresponds to the JSON property `modelType`
10565
+ # @return [String]
10566
+ attr_accessor :model_type
10567
+
10568
+ def initialize(**args)
10569
+ update!(**args)
10570
+ end
10571
+
10572
+ # Update properties of this object
10573
+ def update!(**args)
10574
+ @model_type = args[:model_type] if args.key?(:model_type)
9725
10575
  end
9726
10576
  end
9727
10577
 
@@ -9745,7 +10595,10 @@ module Google
9745
10595
  end
9746
10596
  end
9747
10597
 
9748
- # Safety specification.
10598
+ # Safety specification. There are two use cases: 1. when only safety_spec.enable
10599
+ # is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.
10600
+ # 2. when safety_spec.enable is set and some safety_settings are set, only
10601
+ # specified safety_settings are applied.
9749
10602
  class GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec
9750
10603
  include Google::Apis::Core::Hashable
9751
10604
 
@@ -13350,8 +14203,8 @@ module Google
13350
14203
  attr_accessor :display_name
13351
14204
 
13352
14205
  # The industry vertical that the engine registers. The restriction of the Engine
13353
- # industry vertical is based on DataStore: If unspecified, default to `GENERIC`.
13354
- # Vertical on Engine has to match vertical of the DataStore linked to the engine.
14206
+ # industry vertical is based on DataStore: Vertical on Engine has to match
14207
+ # vertical of the DataStore linked to the engine.
13355
14208
  # Corresponds to the JSON property `industryVertical`
13356
14209
  # @return [String]
13357
14210
  attr_accessor :industry_vertical
@@ -13802,6 +14655,17 @@ module Google
13802
14655
  # @return [Array<String>]
13803
14656
  attr_accessor :resource_types
13804
14657
 
14658
+ # Optional. Whether to update the DataStore schema to the latest predefined
14659
+ # schema. If true, the DataStore schema will be updated to include any FHIR
14660
+ # fields or resource types that have been added since the last import and
14661
+ # corresponding FHIR resources will be imported from the FHIR store. Note this
14662
+ # field cannot be used in conjunction with `resource_types`. It should be used
14663
+ # after initial import.
14664
+ # Corresponds to the JSON property `updateFromLatestPredefinedSchema`
14665
+ # @return [Boolean]
14666
+ attr_accessor :update_from_latest_predefined_schema
14667
+ alias_method :update_from_latest_predefined_schema?, :update_from_latest_predefined_schema
14668
+
13805
14669
  def initialize(**args)
13806
14670
  update!(**args)
13807
14671
  end
@@ -13811,6 +14675,7 @@ module Google
13811
14675
  @fhir_store = args[:fhir_store] if args.key?(:fhir_store)
13812
14676
  @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
13813
14677
  @resource_types = args[:resource_types] if args.key?(:resource_types)
14678
+ @update_from_latest_predefined_schema = args[:update_from_latest_predefined_schema] if args.key?(:update_from_latest_predefined_schema)
13814
14679
  end
13815
14680
  end
13816
14681
 
@@ -17270,6 +18135,11 @@ module Google
17270
18135
  class GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec
17271
18136
  include Google::Apis::Core::Hashable
17272
18137
 
18138
+ # Boost specification to boost certain documents.
18139
+ # Corresponds to the JSON property `boostSpec`
18140
+ # @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec]
18141
+ attr_accessor :boost_spec
18142
+
17273
18143
  # Required. Full resource name of DataStore, such as `projects/`project`/
17274
18144
  # locations/`location`/collections/`collection_id`/dataStores/`data_store_id``.
17275
18145
  # Corresponds to the JSON property `dataStore`
@@ -17289,6 +18159,7 @@ module Google
17289
18159
 
17290
18160
  # Update properties of this object
17291
18161
  def update!(**args)
18162
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
17292
18163
  @data_store = args[:data_store] if args.key?(:data_store)
17293
18164
  @filter = args[:filter] if args.key?(:filter)
17294
18165
  end
@@ -18815,11 +19686,25 @@ module Google
18815
19686
  class GoogleCloudDiscoveryengineV1betaSession
18816
19687
  include Google::Apis::Core::Hashable
18817
19688
 
19689
+ # Optional. The display name of the session. This field is used to identify the
19690
+ # session in the UI. By default, the display name is the first turn query text
19691
+ # in the session.
19692
+ # Corresponds to the JSON property `displayName`
19693
+ # @return [String]
19694
+ attr_accessor :display_name
19695
+
18818
19696
  # Output only. The time the session finished.
18819
19697
  # Corresponds to the JSON property `endTime`
18820
19698
  # @return [String]
18821
19699
  attr_accessor :end_time
18822
19700
 
19701
+ # Optional. Whether the session is pinned, pinned session will be displayed on
19702
+ # the top of the session list.
19703
+ # Corresponds to the JSON property `isPinned`
19704
+ # @return [Boolean]
19705
+ attr_accessor :is_pinned
19706
+ alias_method :is_pinned?, :is_pinned
19707
+
18823
19708
  # Immutable. Fully qualified name `projects/`project`/locations/global/
18824
19709
  # collections/`collection`/engines/`engine`/sessions/*`
18825
19710
  # Corresponds to the JSON property `name`
@@ -18852,7 +19737,9 @@ module Google
18852
19737
 
18853
19738
  # Update properties of this object
18854
19739
  def update!(**args)
19740
+ @display_name = args[:display_name] if args.key?(:display_name)
18855
19741
  @end_time = args[:end_time] if args.key?(:end_time)
19742
+ @is_pinned = args[:is_pinned] if args.key?(:is_pinned)
18856
19743
  @name = args[:name] if args.key?(:name)
18857
19744
  @start_time = args[:start_time] if args.key?(:start_time)
18858
19745
  @state = args[:state] if args.key?(:state)