diff --git a/clients/discovery_engine/README.md b/clients/discovery_engine/README.md index 29f3fd2716..2f480d9803 100644 --- a/clients/discovery_engine/README.md +++ b/clients/discovery_engine/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_discovery_engine, "~> 0.3"}] + [{:google_api_discovery_engine, "~> 0.4"}] end ``` diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex index 71c78a43bf..bf731b5d07 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta do API client metadata for GoogleApi.DiscoveryEngine.V1beta. """ - @discovery_revision "20240312" + @discovery_revision "20240318" def discovery_revision(), do: @discovery_revision end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex index 0bf09565ee..7dc015254e 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## Attributes - * `boost` (*type:* `number()`, *default:* `nil`) - 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. + * `boost` (*type:* `number()`, *default:* `nil`) - 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. * `condition` (*type:* `String.t`, *default:* `nil`) - 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"))` """ diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex index 97444c0360..112c205e3e 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex @@ -28,6 +28,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `modelPromptSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec.t`, *default:* `nil`) - If specified, the spec will be used to modify the prompt provided to the LLM. * `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec.t`, *default:* `nil`) - If specified, the spec will be used to modify the model specification provided to the LLM. * `summaryResultCount` (*type:* `integer()`, *default:* `nil`) - 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 can be used to generate a summary. + * `useSemanticChunks` (*type:* `boolean()`, *default:* `nil`) - If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Please 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. """ use GoogleApi.Gax.ModelBase @@ -43,7 +44,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet :modelSpec => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec.t() | nil, - :summaryResultCount => integer() | nil + :summaryResultCount => integer() | nil, + :useSemanticChunks => boolean() | nil } field(:ignoreAdversarialQuery) @@ -62,6 +64,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ) field(:summaryResultCount) + field(:useSemanticChunks) end defimpl Poison.Decoder, diff --git a/clients/discovery_engine/mix.exs b/clients/discovery_engine/mix.exs index 41474eddf6..af7ff05bba 100644 --- a/clients/discovery_engine/mix.exs +++ b/clients/discovery_engine/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.DiscoveryEngine.Mixfile do use Mix.Project - @version "0.3.0" + @version "0.4.0" def project() do [