Skip to content

Commit

Permalink
feat: Automated regeneration of Dialogflow client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Nov 2, 2024
1 parent 2b13da6 commit 4ebd3bc
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/dialogflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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())
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion clients/dialogflow/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Dialogflow.Mixfile do
use Mix.Project

@version "0.87.0"
@version "0.88.0"

def project() do
[
Expand Down

0 comments on commit 4ebd3bc

Please sign in to comment.