diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.branches.documents.html index 69499ebe77..e67fa75f91 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.branches.documents.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.branches.documents.html @@ -332,6 +332,7 @@

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.servingConfigs.html index bff34ebe3f..6500b4fa2b 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.servingConfigs.html @@ -80,6 +80,9 @@

Instance Methods

close()

Close httplib2 connections.

+

+ patch(name, body=None, updateMask=None, x__xgafv=None)

+

Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.

recommend(servingConfig, body=None, x__xgafv=None)

Makes a recommendation, which requires a contextual user event.

@@ -95,6 +98,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -138,12 +144,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -169,6 +178,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -250,6 +278,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -344,7 +386,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -369,6 +413,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -477,6 +535,189 @@

Method Details

Close httplib2 connections.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None) +
Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
+
+Args:
+  name: string, Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+  updateMask: string, Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+
recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
@@ -736,6 +977,25 @@ 

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1040,6 +1300,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1304,4 +1583,432 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.answers.html index ca84b4cc34..922762357e 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.html index fe20615f55..1d440e3f22 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.userEvents.html index 9250f55836..4ea15a9f76 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.servingConfigs.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.servingConfigs.html
index 0fb842a2c3..27b026c1d6 100644
--- a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.servingConfigs.html
+++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.servingConfigs.html
@@ -80,6 +80,9 @@ 

Instance Methods

close()

Close httplib2 connections.

+

+ patch(name, body=None, updateMask=None, x__xgafv=None)

+

Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.

recommend(servingConfig, body=None, x__xgafv=None)

Makes a recommendation, which requires a contextual user event.

@@ -95,6 +98,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -138,12 +144,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -169,6 +178,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -250,6 +278,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -344,7 +386,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -369,6 +413,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -477,6 +535,189 @@

Method Details

Close httplib2 connections.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None) +
Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
+
+Args:
+  name: string, Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+  updateMask: string, Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+
recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
@@ -736,6 +977,25 @@ 

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1040,6 +1300,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1304,4 +1583,432 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.answers.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.answers.html index 6b30efff1f..77bad4e4d9 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.html b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.html index 5d789157ea..75cdc7fb0c 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.collections.engines.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.branches.documents.html index 27646ef51c..28caf4e0e0 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.branches.documents.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.branches.documents.html @@ -332,6 +332,7 @@

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.servingConfigs.html index 98a966e600..f2c946ac16 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.servingConfigs.html @@ -80,6 +80,9 @@

Instance Methods

close()

Close httplib2 connections.

+

+ patch(name, body=None, updateMask=None, x__xgafv=None)

+

Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.

recommend(servingConfig, body=None, x__xgafv=None)

Makes a recommendation, which requires a contextual user event.

@@ -95,6 +98,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -138,12 +144,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -169,6 +178,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -250,6 +278,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -344,7 +386,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -369,6 +413,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -477,6 +535,189 @@

Method Details

Close httplib2 connections.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None) +
Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
+
+Args:
+  name: string, Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+  updateMask: string, Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # 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.
+  "boostControlIds": [ # 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.
+    "A String",
+  ],
+  "createTime": "A String", # Output only. ServingConfig created timestamp.
+  "displayName": "A 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.
+  "dissociateControlIds": [ # 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.
+    "A String",
+  ],
+  "diversityLevel": "A String", # How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "filterControlIds": [ # 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.
+    "A String",
+  ],
+  "genericConfig": { # Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. # The GenericConfig of the serving configuration.
+    "contentSearchSpec": { # A specification for configuring the behavior of content search. # Specifies the expected behavior of content search. Only valid for content-search enabled data store.
+      "chunkSpec": { # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS # Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS
+        "numNextChunks": 42, # The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
+        "numPreviousChunks": 42, # The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
+      },
+      "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response.
+        "maxExtractiveAnswerCount": 42, # The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.
+        "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.
+        "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments.
+        "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.
+        "returnExtractiveSegmentScore": True or False, # Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.
+      },
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.
+      "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response.
+        "maxSnippetCount": 42, # [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.
+        "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet.
+        "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+      },
+      "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response.
+        "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.
+        "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+        "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.
+        "ignoreNonSummarySeekingQuery": True or False, # Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.
+        "includeCitations": True or False, # Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.
+        "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+        "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM.
+          "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.
+        },
+        "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM.
+          "version": "A String", # The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
+        },
+        "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
+        "useSemanticChunks": True or False, # If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.
+      },
+    },
+  },
+  "ignoreControlIds": [ # 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.
+    "A String",
+  ],
+  "mediaConfig": { # 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. # The MediaConfig of the serving configuration.
+    "contentFreshnessCutoffDays": 42, # Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.
+    "contentWatchedPercentageThreshold": 3.14, # Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.
+    "contentWatchedSecondsThreshold": 3.14, # Specifies the content watched minutes threshold for demotion.
+    "demoteContentWatchedPastDays": 42, # Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.
+    "demotionEventType": "A String", # Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.
+  },
+  "modelId": "A String", # The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.
+  "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
+  "onewaySynonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "promoteControlIds": [ # Condition promote specifications. Maximum number of specifications is 100.
+    "A String",
+  ],
+  "rankingExpression": "A String", # The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+  "redirectControlIds": [ # 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.
+    "A String",
+  ],
+  "replacementControlIds": [ # 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.
+    "A String",
+  ],
+  "solutionType": "A String", # Required. Immutable. Specifies the solution type that a serving config can be associated with.
+  "synonymsControlIds": [ # 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.
+    "A String",
+  ],
+  "updateTime": "A String", # Output only. ServingConfig updated timestamp.
+}
+
+
recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
@@ -736,6 +977,25 @@ 

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1040,6 +1300,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1304,4 +1583,432 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.answers.html index 99c503f72e..180349dfe2 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.html b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.html index d98e6e3174..0d45ef985c 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.userEvents.html index aac3992435..df4a39c495 100644 --- a/docs/dyn/discoveryengine_v1.projects.locations.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1.projects.locations.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1.projects.locations.userEvents.html b/docs/dyn/discoveryengine_v1.projects.locations.userEvents.html
index 2fa28f37a8..d2b44c5b88 100644
--- a/docs/dyn/discoveryengine_v1.projects.locations.userEvents.html
+++ b/docs/dyn/discoveryengine_v1.projects.locations.userEvents.html
@@ -97,7 +97,7 @@ 

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.branches.documents.html
index 10e11d58c8..8b3f9c58c1 100644
--- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.branches.documents.html
+++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.branches.documents.html
@@ -409,6 +409,7 @@ 

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.servingConfigs.html index 41250c26f9..e87e70a60d 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.servingConfigs.html @@ -107,6 +107,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -184,6 +190,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -271,6 +296,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -365,7 +404,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -390,6 +431,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1227,6 +1282,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1726,6 +1800,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2182,4 +2275,441 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "customFineTuningSpec": { # Defines custom fine tuning spec. # Custom fine tuning configs.
+        "enableSearchAdaptor": True or False, # Whether or not to enable and include custom fine tuned search adaptor model.
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.answers.html index 02d5b80b51..dd335b1ac6 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.html index b9286c24f8..57b80ccc1f 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.userEvents.html index e1b1317cdb..779b206c6f 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.servingConfigs.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.servingConfigs.html
index 3fee98f28e..428c051192 100644
--- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.servingConfigs.html
+++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.servingConfigs.html
@@ -107,6 +107,9 @@ 

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -184,6 +190,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -271,6 +296,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -365,7 +404,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -390,6 +431,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1227,6 +1282,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1726,6 +1800,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2182,4 +2275,441 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "customFineTuningSpec": { # Defines custom fine tuning spec. # Custom fine tuning configs.
+        "enableSearchAdaptor": True or False, # Whether or not to enable and include custom fine tuned search adaptor model.
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.answers.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.answers.html index 82847febfa..08a07ff3aa 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html index acb3764f27..ad012e7d2f 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.collections.engines.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.branches.documents.html index f51c6fde44..5eadf7edb5 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.branches.documents.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.branches.documents.html @@ -409,6 +409,7 @@

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.servingConfigs.html index 1d70170add..39ac6404c8 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.servingConfigs.html @@ -107,6 +107,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -184,6 +190,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -271,6 +296,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -365,7 +404,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -390,6 +431,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1227,6 +1282,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1726,6 +1800,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2182,4 +2275,441 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "customFineTuningSpec": { # Defines custom fine tuning spec. # Custom fine tuning configs.
+        "enableSearchAdaptor": True or False, # Whether or not to enable and include custom fine tuned search adaptor model.
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.answers.html index 4888a055d7..b46dfc67b2 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.html index 3beaeab2c6..b4111cf299 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.userEvents.html index 0820d6eb85..27c5063c0c 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.evaluations.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.evaluations.html
index 6b48ccdb03..fe5533e4d5 100644
--- a/docs/dyn/discoveryengine_v1alpha.projects.locations.evaluations.html
+++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.evaluations.html
@@ -204,6 +204,25 @@ 

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -470,6 +489,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -712,6 +750,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, diff --git a/docs/dyn/discoveryengine_v1alpha.projects.locations.userEvents.html b/docs/dyn/discoveryengine_v1alpha.projects.locations.userEvents.html index 3a58a55d01..9257d1f80b 100644 --- a/docs/dyn/discoveryengine_v1alpha.projects.locations.userEvents.html +++ b/docs/dyn/discoveryengine_v1alpha.projects.locations.userEvents.html @@ -97,7 +97,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.branches.documents.html
index 6e8a504b36..292d233af8 100644
--- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.branches.documents.html
+++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.branches.documents.html
@@ -332,6 +332,7 @@ 

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.servingConfigs.html index 6a25ff153b..b3a8e8b3e2 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.servingConfigs.html @@ -107,6 +107,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -181,6 +187,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -268,6 +293,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -362,7 +401,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -387,6 +428,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1176,6 +1231,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1646,6 +1720,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2076,4 +2169,438 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.answers.html index 8557044158..f5e92b204e 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.html index 5a511f5994..21ac9db094 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.userEvents.html index e208cb402a..3ff62e80bc 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.servingConfigs.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.servingConfigs.html
index 0778aab22d..3a15108f57 100644
--- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.servingConfigs.html
+++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.servingConfigs.html
@@ -107,6 +107,9 @@ 

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -181,6 +187,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -268,6 +293,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -362,7 +401,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -387,6 +428,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1176,6 +1231,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1646,6 +1720,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2076,4 +2169,438 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.answers.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.answers.html index bcb7432436..2d4832dc86 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.html b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.html index 7de78ee2ed..796a26fa55 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.collections.engines.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.branches.documents.html b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.branches.documents.html index da6fa545cb..0523aee32c 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.branches.documents.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.branches.documents.html @@ -332,6 +332,7 @@

Method Details

"resourceTypes": [ # The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. "A String", ], + "updateFromLatestPredefinedSchema": True or False, # Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. }, "firestoreSource": { # Firestore source import data from. # Firestore input source. "collectionId": "A String", # Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.servingConfigs.html b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.servingConfigs.html index 7dd11b049f..f49ec60e11 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.servingConfigs.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.servingConfigs.html @@ -107,6 +107,9 @@

Instance Methods

search_next()

Retrieves the next page of results.

+

+ streamAnswer(servingConfig, body=None, x__xgafv=None)

+

Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.

Method Details

answer(servingConfig, body=None, x__xgafv=None) @@ -150,12 +153,15 @@

Method Details

"queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification. "disable": True or False, # Disable query rephraser. "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification. + "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + }, }, }, "relatedQuestionsSpec": { # Related questions specification. # Related questions specification. "enable": True or False, # Enable related questions feature if true. }, - "safetySpec": { # Safety specification. # Model specification. + "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification. "enable": True or False, # Enable the safety filtering on the answer response. It is false by default. }, "searchSpec": { # Search specification. # Search specification. @@ -181,6 +187,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -268,6 +293,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -362,7 +401,9 @@

Method Details

}, "answerQueryToken": "A String", # A global unique ID used for logging. "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -387,6 +428,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -1176,6 +1231,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -1646,6 +1720,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -2076,4 +2169,438 @@

Method Details

+
+ streamAnswer(servingConfig, body=None, x__xgafv=None) +
Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.
+
+Args:
+  servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for ConversationalSearchService.AnswerQuery method.
+  "answerGenerationSpec": { # Answer generation specification. # Answer generation specification.
+    "answerLanguageCode": "A String", # Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.
+    "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.
+    "ignoreJailBreakingQuery": True or False, # Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.
+    "ignoreLowRelevantContent": True or False, # Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.
+    "ignoreNonAnswerSeekingQuery": True or False, # Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.
+    "includeCitations": True or False, # Specifies whether to include citation metadata in the answer. The default value is `false`.
+    "modelSpec": { # Answer Generation Model specification. # Answer generation model specification.
+      "modelVersion": "A String", # Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.
+    },
+    "promptSpec": { # Answer generation prompt specification. # Answer generation prompt specification.
+      "preamble": "A String", # Customized preamble.
+    },
+  },
+  "asynchronousMode": True or False, # Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.
+  "groundingSpec": { # Grounding specification. # Optional. Grounding specification.
+    "filteringLevel": "A String", # Optional. Specifies whether to enable the filtering based on grounding score and at what level.
+    "includeGroundingSupports": True or False, # Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
+  },
+  "query": { # Defines a user inputed query. # Required. Current user query.
+    "queryId": "A String", # Unique Id for the query.
+    "text": "A String", # Plain text.
+  },
+  "queryUnderstandingSpec": { # Query understanding specification. # Query understanding specification.
+    "queryClassificationSpec": { # Query classification specification. # Query classification specification.
+      "types": [ # Enabled query classification types.
+        "A String",
+      ],
+    },
+    "queryRephraserSpec": { # Query rephraser specification. # Query rephraser specification.
+      "disable": True or False, # Disable query rephraser.
+      "maxRephraseSteps": 42, # Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
+      "modelSpec": { # Query Rephraser Model specification. # Optional. Query Rephraser Model specification.
+        "modelType": "A String", # Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
+      },
+    },
+  },
+  "relatedQuestionsSpec": { # Related questions specification. # Related questions specification.
+    "enable": True or False, # Enable related questions feature if true.
+  },
+  "safetySpec": { # Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. # Model specification.
+    "enable": True or False, # Enable the safety filtering on the answer response. It is false by default.
+  },
+  "searchSpec": { # Search specification. # Search specification.
+    "searchParams": { # Search parameters. # Search parameters.
+      "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
+        "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+          { # Boost applies to documents which match a condition.
+            "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+            "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+              "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+              "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                  "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                  "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                },
+              ],
+              "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+              "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+            },
+            "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+          },
+        ],
+      },
+      "dataStoreSpecs": [ # Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
+        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
+          "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
+            "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
+              { # Boost applies to documents which match a condition.
+                "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
+                "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
+                  "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
+                  "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
+                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
+                      "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
+                      "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
+                    },
+                  ],
+                  "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount.
+                  "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below.
+                },
+                "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
+              },
+            ],
+          },
+          "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+          "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+        },
+      ],
+      "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
+      "maxReturnResults": 42, # Number of search results to return. The default value is 10.
+      "naturalLanguageQueryUnderstandingSpec": { # Specification to enable natural language understanding capabilities for search requests. # Optional. Specification to enable natural language understanding capabilities for search requests.
+        "filterExtractionCondition": "A String", # The condition under which filter extraction should occur. Default to Condition.DISABLED.
+        "geoSearchQueryDetectionFieldNames": [ # Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.
+          "A String",
+        ],
+      },
+      "orderBy": "A String", # The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+      "searchResultMode": "A String", # Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
+    },
+    "searchResultList": { # Search result list. # Search result list.
+      "searchResults": [ # Search results.
+        { # Search result.
+          "chunkInfo": { # Chunk information. # Chunk information.
+            "chunk": "A String", # Chunk resource name.
+            "content": "A String", # Chunk textual content.
+            "documentMetadata": { # Document metadata contains the information of the document of the current chunk. # Metadata of the document from the current chunk.
+              "title": "A String", # Title of the document.
+              "uri": "A String", # Uri of the document.
+            },
+          },
+          "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+            "document": "A String", # Document resource name.
+            "documentContexts": [ # List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.
+              { # Document context.
+                "content": "A String", # Document content to be used for answer generation.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveAnswers": [ # Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.
+              { # Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
+                "content": "A String", # Extractive answer content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "extractiveSegments": [ # List of extractive segments.
+              { # Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.
+                "content": "A String", # Extractive segment content.
+                "pageIdentifier": "A String", # Page identifier.
+              },
+            ],
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+        },
+      ],
+    },
+  },
+  "session": "A String", # The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.
+  "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
+    "a_key": "A String",
+  },
+  "userPseudoId": "A String", # A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # Response message for ConversationalSearchService.AnswerQuery method.
+  "answer": { # Defines an answer. # Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
+    "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+      "A String",
+    ],
+    "answerText": "A String", # The textual answer.
+    "citations": [ # Citations.
+      { # Citation info for a segment.
+        "endIndex": "A String", # End of the attributed segment, exclusive.
+        "sources": [ # Citation sources for the attributed segment.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "completeTime": "A String", # Output only. Answer completed timestamp.
+    "createTime": "A String", # Output only. Answer creation timestamp.
+    "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+    "groundingSupports": [ # Optional. Grounding supports.
+      { # Grounding support for a claim in `answer_text`.
+        "endIndex": "A String", # Required. End of the claim, exclusive.
+        "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+        "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+        "sources": [ # Optional. Citation sources for the claim.
+          { # Citation source.
+            "referenceId": "A String", # ID of the citation source.
+          },
+        ],
+        "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+      },
+    ],
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+    "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+      "queryClassificationInfo": [ # Query classification information.
+        { # Query classification information.
+          "positive": True or False, # Classification output.
+          "type": "A String", # Query classification type.
+        },
+      ],
+    },
+    "references": [ # References.
+      { # Reference.
+        "chunkInfo": { # Chunk information. # Chunk information.
+          "chunk": "A String", # Chunk resource name.
+          "content": "A String", # Chunk textual content.
+          "documentMetadata": { # Document metadata. # Document metadata.
+            "document": "A String", # Document resource name.
+            "pageIdentifier": "A String", # Page identifier.
+            "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+              "a_key": "", # Properties of the object.
+            },
+            "title": "A String", # Title.
+            "uri": "A String", # URI for the document.
+          },
+          "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+        },
+        "structuredDocumentInfo": { # Structured search information. # Structured document information.
+          "document": "A String", # Document resource name.
+          "structData": { # Structured search data.
+            "a_key": "", # Properties of the object.
+          },
+        },
+        "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+          "chunkContents": [ # List of cited chunk contents derived from document content.
+            { # Chunk content.
+              "content": "A String", # Chunk textual content.
+              "pageIdentifier": "A String", # Page identifier.
+              "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+            },
+          ],
+          "document": "A String", # Document resource name.
+          "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+            "a_key": "", # Properties of the object.
+          },
+          "title": "A String", # Title.
+          "uri": "A String", # URI for the document.
+        },
+      },
+    ],
+    "relatedQuestions": [ # Suggested related questions.
+      "A String",
+    ],
+    "state": "A String", # The state of the answer generation.
+    "steps": [ # Answer generation steps.
+      { # Step information.
+        "actions": [ # Actions.
+          { # Action.
+            "observation": { # Observation. # Observation.
+              "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                {
+                  "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                    { # Chunk information.
+                      "chunk": "A String", # Chunk resource name.
+                      "content": "A String", # Chunk textual content.
+                      "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                    },
+                  ],
+                  "document": "A String", # Document resource name.
+                  "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                    { # Snippet information.
+                      "snippet": "A String", # Snippet content.
+                      "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                    },
+                  ],
+                  "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+              ],
+            },
+            "searchAction": { # Search action. # Search action.
+              "query": "A String", # The query to search.
+            },
+          },
+        ],
+        "description": "A String", # The description of the step.
+        "state": "A String", # The state of the step.
+        "thought": "A String", # The thought of the step.
+      },
+    ],
+  },
+  "answerQueryToken": "A String", # A global unique ID used for logging.
+  "session": { # External session proto definition. # Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
+    "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
+    "endTime": "A String", # Output only. The time the session finished.
+    "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
+    "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
+    "startTime": "A String", # Output only. The time the session started.
+    "state": "A String", # The state of the session.
+    "turns": [ # Turns.
+      { # Represents a turn, including a query from the user and a answer from service.
+        "answer": "A String", # The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
+        "detailedAnswer": { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
+          "answerSkippedReasons": [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
+            "A String",
+          ],
+          "answerText": "A String", # The textual answer.
+          "citations": [ # Citations.
+            { # Citation info for a segment.
+              "endIndex": "A String", # End of the attributed segment, exclusive.
+              "sources": [ # Citation sources for the attributed segment.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Index indicates the start of the segment, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "completeTime": "A String", # Output only. Answer completed timestamp.
+          "createTime": "A String", # Output only. Answer creation timestamp.
+          "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
+          "groundingSupports": [ # Optional. Grounding supports.
+            { # Grounding support for a claim in `answer_text`.
+              "endIndex": "A String", # Required. End of the claim, exclusive.
+              "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
+              "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
+              "sources": [ # Optional. Citation sources for the claim.
+                { # Citation source.
+                  "referenceId": "A String", # ID of the citation source.
+                },
+              ],
+              "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
+            },
+          ],
+          "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
+          "queryUnderstandingInfo": { # Query understanding information. # Query understanding information.
+            "queryClassificationInfo": [ # Query classification information.
+              { # Query classification information.
+                "positive": True or False, # Classification output.
+                "type": "A String", # Query classification type.
+              },
+            ],
+          },
+          "references": [ # References.
+            { # Reference.
+              "chunkInfo": { # Chunk information. # Chunk information.
+                "chunk": "A String", # Chunk resource name.
+                "content": "A String", # Chunk textual content.
+                "documentMetadata": { # Document metadata. # Document metadata.
+                  "document": "A String", # Document resource name.
+                  "pageIdentifier": "A String", # Page identifier.
+                  "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                    "a_key": "", # Properties of the object.
+                  },
+                  "title": "A String", # Title.
+                  "uri": "A String", # URI for the document.
+                },
+                "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+              },
+              "structuredDocumentInfo": { # Structured search information. # Structured document information.
+                "document": "A String", # Document resource name.
+                "structData": { # Structured search data.
+                  "a_key": "", # Properties of the object.
+                },
+              },
+              "unstructuredDocumentInfo": { # Unstructured document information. # Unstructured document information.
+                "chunkContents": [ # List of cited chunk contents derived from document content.
+                  { # Chunk content.
+                    "content": "A String", # Chunk textual content.
+                    "pageIdentifier": "A String", # Page identifier.
+                    "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                  },
+                ],
+                "document": "A String", # Document resource name.
+                "structData": { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
+                  "a_key": "", # Properties of the object.
+                },
+                "title": "A String", # Title.
+                "uri": "A String", # URI for the document.
+              },
+            },
+          ],
+          "relatedQuestions": [ # Suggested related questions.
+            "A String",
+          ],
+          "state": "A String", # The state of the answer generation.
+          "steps": [ # Answer generation steps.
+            { # Step information.
+              "actions": [ # Actions.
+                { # Action.
+                  "observation": { # Observation. # Observation.
+                    "searchResults": [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
+                      {
+                        "chunkInfo": [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
+                          { # Chunk information.
+                            "chunk": "A String", # Chunk resource name.
+                            "content": "A String", # Chunk textual content.
+                            "relevanceScore": 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
+                          },
+                        ],
+                        "document": "A String", # Document resource name.
+                        "snippetInfo": [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
+                          { # Snippet information.
+                            "snippet": "A String", # Snippet content.
+                            "snippetStatus": "A String", # Status of the snippet defined by the search team.
+                          },
+                        ],
+                        "structData": { # Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result.
+                          "a_key": "", # Properties of the object.
+                        },
+                        "title": "A String", # Title.
+                        "uri": "A String", # URI for the document.
+                      },
+                    ],
+                  },
+                  "searchAction": { # Search action. # Search action.
+                    "query": "A String", # The query to search.
+                  },
+                },
+              ],
+              "description": "A String", # The description of the step.
+              "state": "A String", # The state of the step.
+              "thought": "A String", # The thought of the step.
+            },
+          ],
+        },
+        "query": { # Defines a user inputed query. # The user query.
+          "queryId": "A String", # Unique Id for the query.
+          "text": "A String", # Plain text.
+        },
+      },
+    ],
+    "userPseudoId": "A String", # A unique identifier for tracking users.
+  },
+}
+
+ \ No newline at end of file diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.answers.html b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.answers.html index 6f33a542ed..f9be0787eb 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.answers.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.answers.html @@ -118,6 +118,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.html b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.html index 81b3509109..29c7d0858c 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.sessions.html @@ -89,7 +89,7 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

- get(name, x__xgafv=None)

+ get(name, includeAnswerDetails=None, x__xgafv=None)

Gets a Session.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

@@ -116,7 +116,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -141,6 +143,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -251,7 +267,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -276,6 +294,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -397,11 +429,12 @@

Method Details

- get(name, x__xgafv=None) + get(name, includeAnswerDetails=None, x__xgafv=None)
Gets a Session.
 
 Args:
   name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
+  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
   x__xgafv: string, V1 error format.
     Allowed values
       1 - v1 error format
@@ -411,7 +444,9 @@ 

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -436,6 +471,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -545,7 +594,7 @@

Method Details

Args: parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required) filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" - orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: "update_time desc" "create_time" + orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned first, then by update_time. pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. x__xgafv: string, V1 error format. @@ -560,7 +609,9 @@

Method Details

"nextPageToken": "A String", # Pagination token, if not returned indicates the last page. "sessions": [ # All the Sessions for a given data store. { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -585,6 +636,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -713,7 +778,9 @@

Method Details

The object takes the form of: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -738,6 +805,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. @@ -849,7 +930,9 @@

Method Details

An object of the form: { # External session proto definition. + "displayName": "A String", # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. "endTime": "A String", # Output only. The time the session finished. + "isPinned": True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` "startTime": "A String", # Output only. The time the session started. "state": "A String", # The state of the session. @@ -874,6 +957,20 @@

Method Details

], "completeTime": "A String", # Output only. Answer completed timestamp. "createTime": "A String", # Output only. Answer creation timestamp. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + "groundingSupports": [ # Optional. Grounding supports. + { # Grounding support for a claim in `answer_text`. + "endIndex": "A String", # Required. End of the claim, exclusive. + "groundingCheckRequired": True or False, # Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + "groundingScore": 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + "sources": [ # Optional. Citation sources for the claim. + { # Citation source. + "referenceId": "A String", # ID of the citation source. + }, + ], + "startIndex": "A String", # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + }, + ], "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` "queryUnderstandingInfo": { # Query understanding information. # Query understanding information. "queryClassificationInfo": [ # Query classification information. diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.userEvents.html b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.userEvents.html index bc9655d9bb..2dce5b9c1f 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.userEvents.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.dataStores.userEvents.html @@ -100,7 +100,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.evaluations.html b/docs/dyn/discoveryengine_v1beta.projects.locations.evaluations.html
index fb55ec2a06..94130f75a4 100644
--- a/docs/dyn/discoveryengine_v1beta.projects.locations.evaluations.html
+++ b/docs/dyn/discoveryengine_v1beta.projects.locations.evaluations.html
@@ -201,6 +201,25 @@ 

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -464,6 +483,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, @@ -703,6 +741,25 @@

Method Details

}, "dataStoreSpecs": [ # Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores. For engines with a single data store, the specs directly under SearchRequest should be used. { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. + "boostSpec": { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + "conditionBoostSpecs": [ # Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + { # Boost applies to documents which match a condition. + "boost": 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. + "boostControlSpec": { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value. + "attributeType": "A String", # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). + "controlPoints": [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. + { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). + "attributeValue": "A String", # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. + "boostAmount": 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. + }, + ], + "fieldName": "A String", # The name of the field whose value will be used to determine the boost amount. + "interpolationType": "A String", # The interpolation type to be applied to connect the control points listed below. + }, + "condition": "A String", # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + }, + ], + }, "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. "filter": "A String", # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) }, diff --git a/docs/dyn/discoveryengine_v1beta.projects.locations.userEvents.html b/docs/dyn/discoveryengine_v1beta.projects.locations.userEvents.html index 440af0af11..cd49f265cc 100644 --- a/docs/dyn/discoveryengine_v1beta.projects.locations.userEvents.html +++ b/docs/dyn/discoveryengine_v1beta.projects.locations.userEvents.html @@ -97,7 +97,7 @@

Method Details

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
 
 Args:
-  parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required)
+  parent: string, Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required)
   ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
   uri: string, The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.
   userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
diff --git a/googleapiclient/discovery_cache/documents/discoveryengine.v1.json b/googleapiclient/discovery_cache/documents/discoveryengine.v1.json
index 7533ee36bd..15fd6d84bf 100644
--- a/googleapiclient/discovery_cache/documents/discoveryengine.v1.json
+++ b/googleapiclient/discovery_cache/documents/discoveryengine.v1.json
@@ -1719,6 +1719,40 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"patch": {
+"description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}",
+"httpMethod": "PATCH",
+"id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch",
+"parameterOrder": [
+"name"
+],
+"parameters": {
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+},
+"updateMask": {
+"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.",
+"format": "google-fieldmask",
+"location": "query",
+"type": "string"
+}
+},
+"path": "v1/{+name}",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "recommend": {
 "description": "Makes a recommendation, which requires a contextual user event.",
 "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend",
@@ -1802,6 +1836,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -1869,6 +1931,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -1900,7 +1967,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -2546,7 +2613,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -3278,6 +3345,40 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"patch": {
+"description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}",
+"httpMethod": "PATCH",
+"id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch",
+"parameterOrder": [
+"name"
+],
+"parameters": {
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+},
+"updateMask": {
+"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.",
+"format": "google-fieldmask",
+"location": "query",
+"type": "string"
+}
+},
+"path": "v1/{+name}",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "recommend": {
 "description": "Makes a recommendation, which requires a contextual user event.",
 "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend",
@@ -3361,6 +3462,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -3428,6 +3557,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -3459,7 +3593,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -4984,6 +5118,40 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"patch": {
+"description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}",
+"httpMethod": "PATCH",
+"id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch",
+"parameterOrder": [
+"name"
+],
+"parameters": {
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+},
+"updateMask": {
+"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.",
+"format": "google-fieldmask",
+"location": "query",
+"type": "string"
+}
+},
+"path": "v1/{+name}",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfig"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "recommend": {
 "description": "Makes a recommendation, which requires a contextual user event.",
 "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend",
@@ -5067,6 +5235,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -5134,6 +5330,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -5165,7 +5366,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -5605,7 +5806,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -5949,7 +6150,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+$",
 "required": true,
@@ -6140,7 +6341,7 @@
 }
 }
 },
-"revision": "20241123",
+"revision": "20241206",
 "rootUrl": "https://discoveryengine.googleapis.com/",
 "schemas": {
 "GoogleApiDistribution": {
@@ -6610,6 +6811,18 @@
 "readOnly": true,
 "type": "string"
 },
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"groundingSupports": {
+"description": "Optional. Grounding supports.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport"
+},
+"type": "array"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`",
 "type": "string"
@@ -6638,13 +6851,15 @@
 "STATE_UNSPECIFIED",
 "IN_PROGRESS",
 "FAILED",
-"SUCCEEDED"
+"SUCCEEDED",
+"STREAMING"
 ],
 "enumDescriptions": [
 "Unknown.",
 "Answer generation is currently in progress.",
 "Answer generation currently failed.",
-"Answer generation has succeeded."
+"Answer generation has succeeded.",
+"Answer generation is currently in progress."
 ],
 "type": "string"
 },
@@ -6693,6 +6908,39 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1AnswerGroundingSupport": {
+"description": "Grounding support for a claim in `answer_text`.",
+"id": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport",
+"properties": {
+"endIndex": {
+"description": "Required. End of the claim, exclusive.",
+"format": "int64",
+"type": "string"
+},
+"groundingCheckRequired": {
+"description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.",
+"type": "boolean"
+},
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"sources": {
+"description": "Optional. Citation sources for the claim.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerCitationSource"
+},
+"type": "array"
+},
+"startIndex": {
+"description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1AnswerQueryRequest": {
 "description": "Request message for ConversationalSearchService.AnswerQuery method.",
 "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequest",
@@ -6889,6 +7137,31 @@
 "description": "Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.",
 "format": "int32",
 "type": "integer"
+},
+"modelSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"description": "Optional. Query Rephraser Model specification."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": {
+"description": "Query Rephraser Model specification.",
+"id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"properties": {
+"modelType": {
+"description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.",
+"enum": [
+"MODEL_TYPE_UNSPECIFIED",
+"SMALL",
+"LARGE"
+],
+"enumDescriptions": [
+"Unspecified model type.",
+"Small query rephraser model. Gemini 1.0 XS model.",
+"Large query rephraser model. Gemini 1.0 Pro model."
+],
+"type": "string"
 }
 },
 "type": "object"
@@ -6905,7 +7178,7 @@
 "type": "object"
 },
 "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec": {
-"description": "Safety specification.",
+"description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.",
 "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec",
 "properties": {
 "enable": {
@@ -9511,6 +9784,10 @@
 "type": "string"
 },
 "type": "array"
+},
+"updateFromLatestPredefinedSchema": {
+"description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.",
+"type": "boolean"
 }
 },
 "type": "object"
@@ -11200,6 +11477,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
@@ -11717,16 +11998,194 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1ServingConfig": {
+"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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfig",
+"properties": {
+"boostControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"createTime": {
+"description": "Output only. ServingConfig created timestamp.",
+"format": "google-datetime",
+"readOnly": true,
+"type": "string"
+},
+"displayName": {
+"description": "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.",
+"type": "string"
+},
+"dissociateControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"diversityLevel": {
+"description": "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.",
+"type": "string"
+},
+"filterControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"genericConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
+"description": "The GenericConfig of the serving configuration."
+},
+"ignoreControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"mediaConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
+"description": "The MediaConfig of the serving configuration."
+},
+"modelId": {
+"description": "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.",
+"type": "string"
+},
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"type": "string"
+},
+"onewaySynonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"promoteControlIds": {
+"description": "Condition promote specifications. Maximum number of specifications is 100.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"rankingExpression": {
+"description": "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)`.",
+"type": "string"
+},
+"redirectControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"replacementControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"solutionType": {
+"description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.",
+"enum": [
+"SOLUTION_TYPE_UNSPECIFIED",
+"SOLUTION_TYPE_RECOMMENDATION",
+"SOLUTION_TYPE_SEARCH",
+"SOLUTION_TYPE_CHAT",
+"SOLUTION_TYPE_GENERATIVE_CHAT"
+],
+"enumDescriptions": [
+"Default value.",
+"Used for Recommendations AI.",
+"Used for Discovery Search.",
+"Used for use cases related to the Generative AI agent.",
+"Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution."
+],
+"type": "string"
+},
+"synonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"updateTime": {
+"description": "Output only. ServingConfig updated timestamp.",
+"format": "google-datetime",
+"readOnly": true,
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": {
+"description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
+"properties": {
+"contentSearchSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec",
+"description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": {
+"description": "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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
+"properties": {
+"contentFreshnessCutoffDays": {
+"description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.",
+"format": "int32",
+"type": "integer"
+},
+"contentWatchedPercentageThreshold": {
+"description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.",
+"format": "float",
+"type": "number"
+},
+"contentWatchedSecondsThreshold": {
+"description": "Specifies the content watched minutes threshold for demotion.",
+"format": "float",
+"type": "number"
+},
+"demoteContentWatchedPastDays": {
+"description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.",
+"format": "int32",
+"type": "integer"
+},
+"demotionEventType": {
+"description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1Session": {
 "description": "External session proto definition.",
 "id": "GoogleCloudDiscoveryengineV1Session",
 "properties": {
+"displayName": {
+"description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.",
+"type": "string"
+},
 "endTime": {
 "description": "Output only. The time the session finished.",
 "format": "google-datetime",
 "readOnly": true,
 "type": "string"
 },
+"isPinned": {
+"description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.",
+"type": "boolean"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`",
 "type": "string"
@@ -12431,6 +12890,18 @@
 "readOnly": true,
 "type": "string"
 },
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"groundingSupports": {
+"description": "Optional. Grounding supports.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport"
+},
+"type": "array"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`",
 "type": "string"
@@ -12459,13 +12930,15 @@
 "STATE_UNSPECIFIED",
 "IN_PROGRESS",
 "FAILED",
-"SUCCEEDED"
+"SUCCEEDED",
+"STREAMING"
 ],
 "enumDescriptions": [
 "Unknown.",
 "Answer generation is currently in progress.",
 "Answer generation currently failed.",
-"Answer generation has succeeded."
+"Answer generation has succeeded.",
+"Answer generation is currently in progress."
 ],
 "type": "string"
 },
@@ -12514,6 +12987,39 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": {
+"description": "Grounding support for a claim in `answer_text`.",
+"id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport",
+"properties": {
+"endIndex": {
+"description": "Required. End of the claim, exclusive.",
+"format": "int64",
+"type": "string"
+},
+"groundingCheckRequired": {
+"description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.",
+"type": "boolean"
+},
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"sources": {
+"description": "Optional. Citation sources for the claim.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource"
+},
+"type": "array"
+},
+"startIndex": {
+"description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": {
 "description": "Query understanding information.",
 "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo",
@@ -13584,6 +14090,17 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": {
+"description": "Request for DeleteSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest",
+"properties": {
+"name": {
+"description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata",
@@ -14371,6 +14888,21 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaGetSessionRequest": {
+"description": "Request for GetSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest",
+"properties": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"type": "boolean"
+},
+"name": {
+"description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": {
 "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.",
 "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse",
@@ -14744,6 +15276,52 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaListSessionsRequest": {
+"description": "Request for ListSessions method.",
+"id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest",
+"properties": {
+"filter": {
+"description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"",
+"type": "string"
+},
+"orderBy": {
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
+"type": "string"
+},
+"pageSize": {
+"description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.",
+"format": "int32",
+"type": "integer"
+},
+"pageToken": {
+"description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.",
+"type": "string"
+},
+"parent": {
+"description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1alphaListSessionsResponse": {
+"description": "Response for ListSessions method.",
+"id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse",
+"properties": {
+"nextPageToken": {
+"description": "Pagination token, if not returned indicates the last page.",
+"type": "string"
+},
+"sessions": {
+"description": "All the Sessions for a given data store.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSession"
+},
+"type": "array"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": {
 "description": "Configuration for Natural Language Query Understanding.",
 "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig",
@@ -15749,6 +16327,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
@@ -16014,12 +16596,20 @@
 "description": "External session proto definition.",
 "id": "GoogleCloudDiscoveryengineV1alphaSession",
 "properties": {
+"displayName": {
+"description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.",
+"type": "string"
+},
 "endTime": {
 "description": "Output only. The time the session finished.",
 "format": "google-datetime",
 "readOnly": true,
 "type": "string"
 },
+"isPinned": {
+"description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.",
+"type": "boolean"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`",
 "type": "string"
@@ -16353,6 +16943,22 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": {
+"description": "Request for UpdateSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest",
+"properties": {
+"session": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSession",
+"description": "Required. The Session to update."
+},
+"updateMask": {
+"description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.",
+"format": "google-fieldmask",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata",
@@ -18647,6 +19253,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
diff --git a/googleapiclient/discovery_cache/documents/discoveryengine.v1alpha.json b/googleapiclient/discovery_cache/documents/discoveryengine.v1alpha.json
index 3c29788a33..bf1de3ca0a 100644
--- a/googleapiclient/discovery_cache/documents/discoveryengine.v1alpha.json
+++ b/googleapiclient/discovery_cache/documents/discoveryengine.v1alpha.json
@@ -2391,6 +2391,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1alpha/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -2458,6 +2486,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -2489,7 +2522,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -3245,7 +3278,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -4271,6 +4304,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1alpha/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -4338,6 +4399,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -4369,7 +4435,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -6285,6 +6351,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1alpha/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -6352,6 +6446,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -6383,7 +6482,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -6911,7 +7010,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -7820,7 +7919,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+$",
 "required": true,
@@ -8057,7 +8156,7 @@
 }
 }
 },
-"revision": "20241123",
+"revision": "20241206",
 "rootUrl": "https://discoveryengine.googleapis.com/",
 "schemas": {
 "GoogleApiDistribution": {
@@ -9825,6 +9924,353 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": {
+"description": "A specification for configuring the behavior of content search.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec",
+"properties": {
+"chunkSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec",
+"description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS"
+},
+"extractiveContentSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec",
+"description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response."
+},
+"searchResultMode": {
+"description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.",
+"enum": [
+"SEARCH_RESULT_MODE_UNSPECIFIED",
+"DOCUMENTS",
+"CHUNKS"
+],
+"enumDescriptions": [
+"Default value.",
+"Returns documents in the search result.",
+"Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified."
+],
+"type": "string"
+},
+"snippetSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec",
+"description": "If `snippetSpec` is not specified, snippets are not included in the search response."
+},
+"summarySpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec",
+"description": "If `summarySpec` is not specified, summaries are not included in the search response."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": {
+"description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec",
+"properties": {
+"numNextChunks": {
+"description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.",
+"format": "int32",
+"type": "integer"
+},
+"numPreviousChunks": {
+"description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.",
+"format": "int32",
+"type": "integer"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": {
+"description": "A specification for configuring the extractive content in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec",
+"properties": {
+"maxExtractiveAnswerCount": {
+"description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.",
+"format": "int32",
+"type": "integer"
+},
+"maxExtractiveSegmentCount": {
+"description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.",
+"format": "int32",
+"type": "integer"
+},
+"numNextSegments": {
+"description": "Return at most `num_next_segments` segments after each selected segments.",
+"format": "int32",
+"type": "integer"
+},
+"numPreviousSegments": {
+"description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.",
+"format": "int32",
+"type": "integer"
+},
+"returnExtractiveSegmentScore": {
+"description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": {
+"description": "A specification for configuring snippets in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec",
+"properties": {
+"maxSnippetCount": {
+"deprecated": true,
+"description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.",
+"format": "int32",
+"type": "integer"
+},
+"referenceOnly": {
+"deprecated": true,
+"description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.",
+"type": "boolean"
+},
+"returnSnippet": {
+"description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": {
+"description": "A specification for configuring a summary returned in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec",
+"properties": {
+"ignoreAdversarialQuery": {
+"description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.",
+"type": "boolean"
+},
+"ignoreJailBreakingQuery": {
+"description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.",
+"type": "boolean"
+},
+"ignoreLowRelevantContent": {
+"description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.",
+"type": "boolean"
+},
+"ignoreNonSummarySeekingQuery": {
+"description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.",
+"type": "boolean"
+},
+"includeCitations": {
+"description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.",
+"type": "boolean"
+},
+"languageCode": {
+"description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.",
+"type": "string"
+},
+"modelPromptSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec",
+"description": "If specified, the spec will be used to modify the prompt provided to the LLM."
+},
+"modelSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec",
+"description": "If specified, the spec will be used to modify the model specification provided to the LLM."
+},
+"summaryResultCount": {
+"description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.",
+"format": "int32",
+"type": "integer"
+},
+"useSemanticChunks": {
+"description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": {
+"description": "Specification of the prompt to use with the model.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec",
+"properties": {
+"preamble": {
+"description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": {
+"description": "Specification of the model.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec",
+"properties": {
+"version": {
+"description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfig": {
+"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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfig",
+"properties": {
+"boostControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"createTime": {
+"description": "Output only. ServingConfig created timestamp.",
+"format": "google-datetime",
+"readOnly": true,
+"type": "string"
+},
+"displayName": {
+"description": "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.",
+"type": "string"
+},
+"dissociateControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"diversityLevel": {
+"description": "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.",
+"type": "string"
+},
+"filterControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"genericConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
+"description": "The GenericConfig of the serving configuration."
+},
+"ignoreControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"mediaConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
+"description": "The MediaConfig of the serving configuration."
+},
+"modelId": {
+"description": "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.",
+"type": "string"
+},
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"type": "string"
+},
+"onewaySynonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"promoteControlIds": {
+"description": "Condition promote specifications. Maximum number of specifications is 100.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"rankingExpression": {
+"description": "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)`.",
+"type": "string"
+},
+"redirectControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"replacementControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"solutionType": {
+"description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.",
+"enum": [
+"SOLUTION_TYPE_UNSPECIFIED",
+"SOLUTION_TYPE_RECOMMENDATION",
+"SOLUTION_TYPE_SEARCH",
+"SOLUTION_TYPE_CHAT",
+"SOLUTION_TYPE_GENERATIVE_CHAT"
+],
+"enumDescriptions": [
+"Default value.",
+"Used for Recommendations AI.",
+"Used for Discovery Search.",
+"Used for use cases related to the Generative AI agent.",
+"Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution."
+],
+"type": "string"
+},
+"synonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"updateTime": {
+"description": "Output only. ServingConfig updated timestamp.",
+"format": "google-datetime",
+"readOnly": true,
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": {
+"description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
+"properties": {
+"contentSearchSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec",
+"description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": {
+"description": "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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
+"properties": {
+"contentFreshnessCutoffDays": {
+"description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.",
+"format": "int32",
+"type": "integer"
+},
+"contentWatchedPercentageThreshold": {
+"description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.",
+"format": "float",
+"type": "number"
+},
+"contentWatchedSecondsThreshold": {
+"description": "Specifies the content watched minutes threshold for demotion.",
+"format": "float",
+"type": "number"
+},
+"demoteContentWatchedPastDays": {
+"description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.",
+"format": "int32",
+"type": "integer"
+},
+"demotionEventType": {
+"description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1SiteVerificationInfo": {
 "description": "Verification information for target sites in advanced site search.",
 "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo",
@@ -10449,6 +10895,18 @@
 "readOnly": true,
 "type": "string"
 },
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"groundingSupports": {
+"description": "Optional. Grounding supports.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport"
+},
+"type": "array"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`",
 "type": "string"
@@ -10477,13 +10935,15 @@
 "STATE_UNSPECIFIED",
 "IN_PROGRESS",
 "FAILED",
-"SUCCEEDED"
+"SUCCEEDED",
+"STREAMING"
 ],
 "enumDescriptions": [
 "Unknown.",
 "Answer generation is currently in progress.",
 "Answer generation currently failed.",
-"Answer generation has succeeded."
+"Answer generation has succeeded.",
+"Answer generation is currently in progress."
 ],
 "type": "string"
 },
@@ -10532,6 +10992,39 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": {
+"description": "Grounding support for a claim in `answer_text`.",
+"id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport",
+"properties": {
+"endIndex": {
+"description": "Required. End of the claim, exclusive.",
+"format": "int64",
+"type": "string"
+},
+"groundingCheckRequired": {
+"description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.",
+"type": "boolean"
+},
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"sources": {
+"description": "Optional. Citation sources for the claim.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource"
+},
+"type": "array"
+},
+"startIndex": {
+"description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": {
 "description": "Request message for ConversationalSearchService.AnswerQuery method.",
 "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest",
@@ -10728,6 +11221,31 @@
 "description": "Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.",
 "format": "int32",
 "type": "integer"
+},
+"modelSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"description": "Optional. Query Rephraser Model specification."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": {
+"description": "Query Rephraser Model specification.",
+"id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"properties": {
+"modelType": {
+"description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.",
+"enum": [
+"MODEL_TYPE_UNSPECIFIED",
+"SMALL",
+"LARGE"
+],
+"enumDescriptions": [
+"Unspecified model type.",
+"Small query rephraser model. Gemini 1.0 XS model.",
+"Large query rephraser model. Gemini 1.0 Pro model."
+],
+"type": "string"
 }
 },
 "type": "object"
@@ -10744,7 +11262,7 @@
 "type": "object"
 },
 "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": {
-"description": "Safety specification.",
+"description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.",
 "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec",
 "properties": {
 "enable": {
@@ -12949,6 +13467,17 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": {
+"description": "Request for DeleteSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest",
+"properties": {
+"name": {
+"description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata",
@@ -13923,6 +14452,10 @@
 "type": "string"
 },
 "type": "array"
+},
+"updateFromLatestPredefinedSchema": {
+"description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.",
+"type": "boolean"
 }
 },
 "type": "object"
@@ -14125,6 +14658,21 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaGetSessionRequest": {
+"description": "Request for GetSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest",
+"properties": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"type": "boolean"
+},
+"name": {
+"description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": {
 "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.",
 "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse",
@@ -15011,6 +15559,34 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaListSessionsRequest": {
+"description": "Request for ListSessions method.",
+"id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest",
+"properties": {
+"filter": {
+"description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"",
+"type": "string"
+},
+"orderBy": {
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
+"type": "string"
+},
+"pageSize": {
+"description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.",
+"format": "int32",
+"type": "integer"
+},
+"pageToken": {
+"description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.",
+"type": "string"
+},
+"parent": {
+"description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": {
 "description": "Response for ListSessions method.",
 "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse",
@@ -16768,6 +17344,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
@@ -17852,12 +18432,20 @@
 "description": "External session proto definition.",
 "id": "GoogleCloudDiscoveryengineV1alphaSession",
 "properties": {
+"displayName": {
+"description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.",
+"type": "string"
+},
 "endTime": {
 "description": "Output only. The time the session finished.",
 "format": "google-datetime",
 "readOnly": true,
 "type": "string"
 },
+"isPinned": {
+"description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.",
+"type": "boolean"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`",
 "type": "string"
@@ -18386,6 +18974,22 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": {
+"description": "Request for UpdateSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest",
+"properties": {
+"session": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSession",
+"description": "Required. The Session to update."
+},
+"updateMask": {
+"description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.",
+"format": "google-fieldmask",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata",
@@ -20791,6 +21395,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
diff --git a/googleapiclient/discovery_cache/documents/discoveryengine.v1beta.json b/googleapiclient/discovery_cache/documents/discoveryengine.v1beta.json
index c8ce5cbc1b..b489a7feb6 100644
--- a/googleapiclient/discovery_cache/documents/discoveryengine.v1beta.json
+++ b/googleapiclient/discovery_cache/documents/discoveryengine.v1beta.json
@@ -1929,6 +1929,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1beta/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -1996,6 +2024,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -2027,7 +2060,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -2730,7 +2763,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -3756,6 +3789,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1beta/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -3823,6 +3884,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -3854,7 +3920,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -5589,6 +5655,34 @@
 "scopes": [
 "https://www.googleapis.com/auth/cloud-platform"
 ]
+},
+"streamAnswer": {
+"description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.",
+"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer",
+"httpMethod": "POST",
+"id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer",
+"parameterOrder": [
+"servingConfig"
+],
+"parameters": {
+"servingConfig": {
+"description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v1beta/{+servingConfig}:streamAnswer",
+"request": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest"
+},
+"response": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
 }
 }
 },
@@ -5656,6 +5750,11 @@
 "name"
 ],
 "parameters": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"location": "query",
+"type": "boolean"
+},
 "name": {
 "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
 "location": "path",
@@ -5687,7 +5786,7 @@
 "type": "string"
 },
 "orderBy": {
-"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"",
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
 "location": "query",
 "type": "string"
 },
@@ -6215,7 +6314,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$",
 "required": true,
@@ -7092,7 +7191,7 @@
 "type": "string"
 },
 "parent": {
-"description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.",
+"description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.",
 "location": "path",
 "pattern": "^projects/[^/]+/locations/[^/]+$",
 "required": true,
@@ -7255,7 +7354,7 @@
 }
 }
 },
-"revision": "20241123",
+"revision": "20241206",
 "rootUrl": "https://discoveryengine.googleapis.com/",
 "schemas": {
 "GoogleApiDistribution": {
@@ -8933,91 +9032,438 @@
 "type": "string"
 },
 "type": "array"
-}
-},
-"type": "object"
-},
-"GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": {
-"description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.",
-"id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata",
-"properties": {
-"createTime": {
-"description": "Operation create time.",
-"format": "google-datetime",
-"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": {
+"description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.",
+"id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata",
+"properties": {
+"createTime": {
+"description": "Operation create time.",
+"format": "google-datetime",
+"type": "string"
+},
+"updateTime": {
+"description": "Operation last update time. If the operation is done, this is also the finish time.",
+"format": "google-datetime",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": {
+"description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.",
+"id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse",
+"properties": {
+"errorSamples": {
+"description": "A sample of errors encountered while processing the request.",
+"items": {
+"$ref": "GoogleRpcStatus"
+},
+"type": "array"
+},
+"purgeCount": {
+"description": "Number of suggestion deny list entries purged.",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1Schema": {
+"description": "Defines the structure and layout of a type of document data.",
+"id": "GoogleCloudDiscoveryengineV1Schema",
+"properties": {
+"jsonSchema": {
+"description": "The JSON representation of the schema.",
+"type": "string"
+},
+"name": {
+"description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.",
+"type": "string"
+},
+"structSchema": {
+"additionalProperties": {
+"description": "Properties of the object.",
+"type": "any"
+},
+"description": "The structured representation of the schema.",
+"type": "object"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchLinkPromotion": {
+"description": "Promotion proto includes uri and other helping information to display the promotion.",
+"id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion",
+"properties": {
+"description": {
+"description": "Optional. The Promotion description. Maximum length: 200 characters.",
+"type": "string"
+},
+"enabled": {
+"description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.",
+"type": "boolean"
+},
+"imageUri": {
+"description": "Optional. The promotion thumbnail image url.",
+"type": "string"
+},
+"title": {
+"description": "Required. The title of the promotion. Maximum length: 160 characters.",
+"type": "string"
+},
+"uri": {
+"description": "Required. The URL for the page the user wants to promote.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": {
+"description": "A specification for configuring the behavior of content search.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec",
+"properties": {
+"chunkSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec",
+"description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS"
+},
+"extractiveContentSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec",
+"description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response."
+},
+"searchResultMode": {
+"description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.",
+"enum": [
+"SEARCH_RESULT_MODE_UNSPECIFIED",
+"DOCUMENTS",
+"CHUNKS"
+],
+"enumDescriptions": [
+"Default value.",
+"Returns documents in the search result.",
+"Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified."
+],
+"type": "string"
+},
+"snippetSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec",
+"description": "If `snippetSpec` is not specified, snippets are not included in the search response."
+},
+"summarySpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec",
+"description": "If `summarySpec` is not specified, summaries are not included in the search response."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": {
+"description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec",
+"properties": {
+"numNextChunks": {
+"description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.",
+"format": "int32",
+"type": "integer"
+},
+"numPreviousChunks": {
+"description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.",
+"format": "int32",
+"type": "integer"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": {
+"description": "A specification for configuring the extractive content in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec",
+"properties": {
+"maxExtractiveAnswerCount": {
+"description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.",
+"format": "int32",
+"type": "integer"
+},
+"maxExtractiveSegmentCount": {
+"description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.",
+"format": "int32",
+"type": "integer"
+},
+"numNextSegments": {
+"description": "Return at most `num_next_segments` segments after each selected segments.",
+"format": "int32",
+"type": "integer"
+},
+"numPreviousSegments": {
+"description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.",
+"format": "int32",
+"type": "integer"
+},
+"returnExtractiveSegmentScore": {
+"description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": {
+"description": "A specification for configuring snippets in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec",
+"properties": {
+"maxSnippetCount": {
+"deprecated": true,
+"description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0.",
+"format": "int32",
+"type": "integer"
+},
+"referenceOnly": {
+"deprecated": true,
+"description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.",
+"type": "boolean"
+},
+"returnSnippet": {
+"description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": {
+"description": "A specification for configuring a summary returned in a search response.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec",
+"properties": {
+"ignoreAdversarialQuery": {
+"description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.",
+"type": "boolean"
+},
+"ignoreJailBreakingQuery": {
+"description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.",
+"type": "boolean"
+},
+"ignoreLowRelevantContent": {
+"description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.",
+"type": "boolean"
+},
+"ignoreNonSummarySeekingQuery": {
+"description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.",
+"type": "boolean"
+},
+"includeCitations": {
+"description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.",
+"type": "boolean"
+},
+"languageCode": {
+"description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.",
+"type": "string"
+},
+"modelPromptSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec",
+"description": "If specified, the spec will be used to modify the prompt provided to the LLM."
+},
+"modelSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec",
+"description": "If specified, the spec will be used to modify the model specification provided to the LLM."
+},
+"summaryResultCount": {
+"description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.",
+"format": "int32",
+"type": "integer"
+},
+"useSemanticChunks": {
+"description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.",
+"type": "boolean"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": {
+"description": "Specification of the prompt to use with the model.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec",
+"properties": {
+"preamble": {
+"description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": {
+"description": "Specification of the model.",
+"id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec",
+"properties": {
+"version": {
+"description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1ServingConfig": {
+"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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfig",
+"properties": {
+"boostControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"createTime": {
+"description": "Output only. ServingConfig created timestamp.",
+"format": "google-datetime",
+"readOnly": true,
+"type": "string"
+},
+"displayName": {
+"description": "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.",
+"type": "string"
+},
+"dissociateControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"diversityLevel": {
+"description": "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.",
+"type": "string"
+},
+"filterControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"genericConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
+"description": "The GenericConfig of the serving configuration."
+},
+"ignoreControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"mediaConfig": {
+"$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
+"description": "The MediaConfig of the serving configuration."
+},
+"modelId": {
+"description": "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.",
+"type": "string"
+},
+"name": {
+"description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`",
+"type": "string"
+},
+"onewaySynonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"promoteControlIds": {
+"description": "Condition promote specifications. Maximum number of specifications is 100.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"rankingExpression": {
+"description": "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)`.",
+"type": "string"
+},
+"redirectControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"replacementControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
+},
+"solutionType": {
+"description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.",
+"enum": [
+"SOLUTION_TYPE_UNSPECIFIED",
+"SOLUTION_TYPE_RECOMMENDATION",
+"SOLUTION_TYPE_SEARCH",
+"SOLUTION_TYPE_CHAT",
+"SOLUTION_TYPE_GENERATIVE_CHAT"
+],
+"enumDescriptions": [
+"Default value.",
+"Used for Recommendations AI.",
+"Used for Discovery Search.",
+"Used for use cases related to the Generative AI agent.",
+"Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution."
+],
+"type": "string"
+},
+"synonymsControlIds": {
+"description": "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.",
+"items": {
+"type": "string"
+},
+"type": "array"
 },
 "updateTime": {
-"description": "Operation last update time. If the operation is done, this is also the finish time.",
+"description": "Output only. ServingConfig updated timestamp.",
 "format": "google-datetime",
+"readOnly": true,
 "type": "string"
 }
 },
 "type": "object"
 },
-"GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": {
-"description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.",
-"id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse",
-"properties": {
-"errorSamples": {
-"description": "A sample of errors encountered while processing the request.",
-"items": {
-"$ref": "GoogleRpcStatus"
-},
-"type": "array"
-},
-"purgeCount": {
-"description": "Number of suggestion deny list entries purged.",
-"format": "int64",
-"type": "string"
-}
-},
-"type": "object"
-},
-"GoogleCloudDiscoveryengineV1Schema": {
-"description": "Defines the structure and layout of a type of document data.",
-"id": "GoogleCloudDiscoveryengineV1Schema",
+"GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": {
+"description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig",
 "properties": {
-"jsonSchema": {
-"description": "The JSON representation of the schema.",
-"type": "string"
-},
-"name": {
-"description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.",
-"type": "string"
-},
-"structSchema": {
-"additionalProperties": {
-"description": "Properties of the object.",
-"type": "any"
-},
-"description": "The structured representation of the schema.",
-"type": "object"
+"contentSearchSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec",
+"description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store."
 }
 },
 "type": "object"
 },
-"GoogleCloudDiscoveryengineV1SearchLinkPromotion": {
-"description": "Promotion proto includes uri and other helping information to display the promotion.",
-"id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion",
+"GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": {
+"description": "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.",
+"id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig",
 "properties": {
-"description": {
-"description": "Optional. The Promotion description. Maximum length: 200 characters.",
-"type": "string"
+"contentFreshnessCutoffDays": {
+"description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.",
+"format": "int32",
+"type": "integer"
 },
-"enabled": {
-"description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.",
-"type": "boolean"
+"contentWatchedPercentageThreshold": {
+"description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.",
+"format": "float",
+"type": "number"
 },
-"imageUri": {
-"description": "Optional. The promotion thumbnail image url.",
-"type": "string"
+"contentWatchedSecondsThreshold": {
+"description": "Specifies the content watched minutes threshold for demotion.",
+"format": "float",
+"type": "number"
 },
-"title": {
-"description": "Required. The title of the promotion. Maximum length: 160 characters.",
-"type": "string"
+"demoteContentWatchedPastDays": {
+"description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.",
+"format": "int32",
+"type": "integer"
 },
-"uri": {
-"description": "Required. The URL for the page the user wants to promote.",
+"demotionEventType": {
+"description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.",
 "type": "string"
 }
 },
@@ -9386,6 +9832,18 @@
 "readOnly": true,
 "type": "string"
 },
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"groundingSupports": {
+"description": "Optional. Grounding supports.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport"
+},
+"type": "array"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`",
 "type": "string"
@@ -9414,13 +9872,15 @@
 "STATE_UNSPECIFIED",
 "IN_PROGRESS",
 "FAILED",
-"SUCCEEDED"
+"SUCCEEDED",
+"STREAMING"
 ],
 "enumDescriptions": [
 "Unknown.",
 "Answer generation is currently in progress.",
 "Answer generation currently failed.",
-"Answer generation has succeeded."
+"Answer generation has succeeded.",
+"Answer generation is currently in progress."
 ],
 "type": "string"
 },
@@ -9469,6 +9929,39 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": {
+"description": "Grounding support for a claim in `answer_text`.",
+"id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport",
+"properties": {
+"endIndex": {
+"description": "Required. End of the claim, exclusive.",
+"format": "int64",
+"type": "string"
+},
+"groundingCheckRequired": {
+"description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.",
+"type": "boolean"
+},
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"sources": {
+"description": "Optional. Citation sources for the claim.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource"
+},
+"type": "array"
+},
+"startIndex": {
+"description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": {
 "description": "Query understanding information.",
 "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo",
@@ -10539,6 +11032,17 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": {
+"description": "Request for DeleteSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest",
+"properties": {
+"name": {
+"description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata",
@@ -11326,6 +11830,21 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaGetSessionRequest": {
+"description": "Request for GetSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest",
+"properties": {
+"includeAnswerDetails": {
+"description": "Optional. If set to true, the full session including all answer details will be returned.",
+"type": "boolean"
+},
+"name": {
+"description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": {
 "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.",
 "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse",
@@ -11699,6 +12218,52 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaListSessionsRequest": {
+"description": "Request for ListSessions method.",
+"id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest",
+"properties": {
+"filter": {
+"description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"",
+"type": "string"
+},
+"orderBy": {
+"description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.",
+"type": "string"
+},
+"pageSize": {
+"description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.",
+"format": "int32",
+"type": "integer"
+},
+"pageToken": {
+"description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.",
+"type": "string"
+},
+"parent": {
+"description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1alphaListSessionsResponse": {
+"description": "Response for ListSessions method.",
+"id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse",
+"properties": {
+"nextPageToken": {
+"description": "Pagination token, if not returned indicates the last page.",
+"type": "string"
+},
+"sessions": {
+"description": "All the Sessions for a given data store.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSession"
+},
+"type": "array"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": {
 "description": "Configuration for Natural Language Query Understanding.",
 "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig",
@@ -12704,6 +13269,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
@@ -12969,12 +13538,20 @@
 "description": "External session proto definition.",
 "id": "GoogleCloudDiscoveryengineV1alphaSession",
 "properties": {
+"displayName": {
+"description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.",
+"type": "string"
+},
 "endTime": {
 "description": "Output only. The time the session finished.",
 "format": "google-datetime",
 "readOnly": true,
 "type": "string"
 },
+"isPinned": {
+"description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.",
+"type": "boolean"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`",
 "type": "string"
@@ -13308,6 +13885,22 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": {
+"description": "Request for UpdateSession method.",
+"id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest",
+"properties": {
+"session": {
+"$ref": "GoogleCloudDiscoveryengineV1alphaSession",
+"description": "Required. The Session to update."
+},
+"updateMask": {
+"description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.",
+"format": "google-fieldmask",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": {
 "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.",
 "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata",
@@ -13708,6 +14301,18 @@
 "readOnly": true,
 "type": "string"
 },
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"groundingSupports": {
+"description": "Optional. Grounding supports.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport"
+},
+"type": "array"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`",
 "type": "string"
@@ -13736,13 +14341,15 @@
 "STATE_UNSPECIFIED",
 "IN_PROGRESS",
 "FAILED",
-"SUCCEEDED"
+"SUCCEEDED",
+"STREAMING"
 ],
 "enumDescriptions": [
 "Unknown.",
 "Answer generation is currently in progress.",
 "Answer generation currently failed.",
-"Answer generation has succeeded."
+"Answer generation has succeeded.",
+"Answer generation is currently in progress."
 ],
 "type": "string"
 },
@@ -13791,6 +14398,39 @@
 },
 "type": "object"
 },
+"GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport": {
+"description": "Grounding support for a claim in `answer_text`.",
+"id": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport",
+"properties": {
+"endIndex": {
+"description": "Required. End of the claim, exclusive.",
+"format": "int64",
+"type": "string"
+},
+"groundingCheckRequired": {
+"description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.",
+"type": "boolean"
+},
+"groundingScore": {
+"description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.",
+"format": "double",
+"type": "number"
+},
+"sources": {
+"description": "Optional. Citation sources for the claim.",
+"items": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerCitationSource"
+},
+"type": "array"
+},
+"startIndex": {
+"description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).",
+"format": "int64",
+"type": "string"
+}
+},
+"type": "object"
+},
 "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest": {
 "description": "Request message for ConversationalSearchService.AnswerQuery method.",
 "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest",
@@ -13987,6 +14627,31 @@
 "description": "Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.",
 "format": "int32",
 "type": "integer"
+},
+"modelSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"description": "Optional. Query Rephraser Model specification."
+}
+},
+"type": "object"
+},
+"GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": {
+"description": "Query Rephraser Model specification.",
+"id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec",
+"properties": {
+"modelType": {
+"description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.",
+"enum": [
+"MODEL_TYPE_UNSPECIFIED",
+"SMALL",
+"LARGE"
+],
+"enumDescriptions": [
+"Unspecified model type.",
+"Small query rephraser model. Gemini 1.0 XS model.",
+"Large query rephraser model. Gemini 1.0 Pro model."
+],
+"type": "string"
 }
 },
 "type": "object"
@@ -14003,7 +14668,7 @@
 "type": "object"
 },
 "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec": {
-"description": "Safety specification.",
+"description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.",
 "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec",
 "properties": {
 "enable": {
@@ -16809,6 +17474,10 @@
 "type": "string"
 },
 "type": "array"
+},
+"updateFromLatestPredefinedSchema": {
+"description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.",
+"type": "boolean"
 }
 },
 "type": "object"
@@ -18939,6 +19608,10 @@
 "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.",
 "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec",
 "properties": {
+"boostSpec": {
+"$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec",
+"description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)"
+},
 "dataStore": {
 "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.",
 "type": "string"
@@ -20015,12 +20688,20 @@
 "description": "External session proto definition.",
 "id": "GoogleCloudDiscoveryengineV1betaSession",
 "properties": {
+"displayName": {
+"description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.",
+"type": "string"
+},
 "endTime": {
 "description": "Output only. The time the session finished.",
 "format": "google-datetime",
 "readOnly": true,
 "type": "string"
 },
+"isPinned": {
+"description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.",
+"type": "boolean"
+},
 "name": {
 "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`",
 "type": "string"