diff --git a/clients/dialogflow/README.md b/clients/dialogflow/README.md index 07e123ec23..96d9021e7d 100644 --- a/clients/dialogflow/README.md +++ b/clients/dialogflow/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_dialogflow, "~> 0.87"}] + [{:google_api_dialogflow, "~> 0.88"}] end ``` diff --git a/clients/dialogflow/lib/google_api/dialogflow/v3/metadata.ex b/clients/dialogflow/lib/google_api/dialogflow/v3/metadata.ex index 9abbce3bce..cb60f67862 100644 --- a/clients/dialogflow/lib/google_api/dialogflow/v3/metadata.ex +++ b/clients/dialogflow/lib/google_api/dialogflow/v3/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Dialogflow.V3 do API client metadata for GoogleApi.Dialogflow.V3. """ - @discovery_revision "20241019" + @discovery_revision "20241025" def discovery_revision(), do: @discovery_revision end diff --git a/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator.ex b/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator.ex index eba4641799..ce14446c97 100644 --- a/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator.ex +++ b/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Generator do ## Attributes * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment. + * `modelParameter` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter.t`, *default:* `nil`) - Parameters passed to the LLM to configure its behavior. * `name` (*type:* `String.t`, *default:* `nil`) - The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: `projects//locations//agents//generators/`. * `placeholders` (*type:* `list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorPlaceholder.t)`, *default:* `nil`) - Optional. List of custom placeholders in the prompt text. * `promptText` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Phrase.t`, *default:* `nil`) - Required. Prompt for the LLM model. @@ -31,6 +32,9 @@ defmodule GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Generator do @type t :: %__MODULE__{ :displayName => String.t() | nil, + :modelParameter => + GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter.t() + | nil, :name => String.t() | nil, :placeholders => list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorPlaceholder.t()) @@ -39,6 +43,11 @@ defmodule GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3Generator do } field(:displayName) + + field(:modelParameter, + as: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter + ) + field(:name) field(:placeholders, diff --git a/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator_model_parameter.ex b/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator_model_parameter.ex new file mode 100644 index 0000000000..16575aa419 --- /dev/null +++ b/clients/dialogflow/lib/google_api/dialogflow/v3/model/google_cloud_dialogflow_cx_v3_generator_model_parameter.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter do + @moduledoc """ + Parameters to be passed to the LLM. If not set, default values will be used. + + ## Attributes + + * `maxDecodeSteps` (*type:* `integer()`, *default:* `nil`) - The maximum number of tokens to generate. + * `temperature` (*type:* `number()`, *default:* `nil`) - The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random. + * `topK` (*type:* `integer()`, *default:* `nil`) - If set, the sampling process in each step is limited to the top_k tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random. + * `topP` (*type:* `number()`, *default:* `nil`) - If set, only the tokens comprising the top top_p probability mass are considered. If both top_p and top_k are set, top_p will be used for further refining candidates selected with top_k. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maxDecodeSteps => integer() | nil, + :temperature => number() | nil, + :topK => integer() | nil, + :topP => number() | nil + } + + field(:maxDecodeSteps) + field(:temperature) + field(:topK) + field(:topP) +end + +defimpl Poison.Decoder, + for: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter do + def decode(value, options) do + GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3GeneratorModelParameter do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/dialogflow/mix.exs b/clients/dialogflow/mix.exs index 5dedd70ce6..8d8112bad0 100644 --- a/clients/dialogflow/mix.exs +++ b/clients/dialogflow/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Dialogflow.Mixfile do use Mix.Project - @version "0.87.0" + @version "0.88.0" def project() do [