Skip to content

Commit

Permalink
feat: [google-cloud-dialogflow-cx] added support for DataStoreConnect…
Browse files Browse the repository at this point in the history
…ion, DataStoreConnectionSettings (#12516)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat: added support for DataStoreConnection, DataStoreConnectionSettings
feat: added support for SpeechSettings
feat: added support for MultiLanguageSettings
feat: added support for PersonalizationSettings
feat: added support for Webhook OAuthConfig, and ServiceAgentAuth
Settings.
docs: clarified wording around quota usage
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 619327167

Source-Link:
googleapis/googleapis@5b25280

Source-Link:
googleapis/googleapis-gen@d4a079f
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImQ0YTA3OWY2NThmMjljMTMzMTViMTA0NDIyODIxYTAyNzljYzRiNzYifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Mar 27, 2024
1 parent 60d87fa commit ce2c9ed
Show file tree
Hide file tree
Showing 17 changed files with 723 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@
ListChangelogsRequest,
ListChangelogsResponse,
)
from .types.data_store_connection import DataStoreConnection, DataStoreType
from .types.data_store_connection import (
DataStoreConnection,
DataStoreConnectionSignals,
DataStoreType,
)
from .types.deployment import (
Deployment,
GetDeploymentRequest,
Expand Down Expand Up @@ -442,6 +446,7 @@
"CreateVersionRequest",
"CreateWebhookRequest",
"DataStoreConnection",
"DataStoreConnectionSignals",
"DataStoreType",
"DeleteAgentRequest",
"DeleteEntityTypeRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
ListChangelogsRequest,
ListChangelogsResponse,
)
from .data_store_connection import DataStoreConnection, DataStoreType
from .data_store_connection import (
DataStoreConnection,
DataStoreConnectionSignals,
DataStoreType,
)
from .deployment import (
Deployment,
GetDeploymentRequest,
Expand Down Expand Up @@ -375,6 +379,7 @@
"ListChangelogsRequest",
"ListChangelogsResponse",
"DataStoreConnection",
"DataStoreConnectionSignals",
"DataStoreType",
"Deployment",
"GetDeploymentRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from typing import MutableMapping, MutableSequence

from google.protobuf import duration_pb2 # type: ignore
import proto # type: ignore

from google.cloud.dialogflowcx_v3beta1.types import gcs
Expand Down Expand Up @@ -52,6 +53,14 @@ class AdvancedSettings(proto.Message):
- Agent level
- Flow level
speech_settings (google.cloud.dialogflowcx_v3beta1.types.AdvancedSettings.SpeechSettings):
Settings for speech to text detection.
Exposed at the following levels:
- Agent level
- Flow level
- Page level
- Parameter level
dtmf_settings (google.cloud.dialogflowcx_v3beta1.types.AdvancedSettings.DtmfSettings):
Settings for DTMF.
Exposed at the following levels:
Expand All @@ -69,6 +78,45 @@ class AdvancedSettings(proto.Message):
- Agent level.
"""

class SpeechSettings(proto.Message):
r"""Define behaviors of speech to text detection.
Attributes:
endpointer_sensitivity (int):
Sensitivity of the speech model that detects
the end of speech. Scale from 0 to 100.
no_speech_timeout (google.protobuf.duration_pb2.Duration):
Timeout before detecting no speech.
use_timeout_based_endpointing (bool):
Use timeout based endpointing, interpreting
endpointer sensitivy as seconds of timeout
value.
models (MutableMapping[str, str]):
Mapping from language to Speech-to-Text model. The mapped
Speech-to-Text model will be selected for requests from its
corresponding language. For more information, see `Speech
models <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models>`__.
"""

endpointer_sensitivity: int = proto.Field(
proto.INT32,
number=1,
)
no_speech_timeout: duration_pb2.Duration = proto.Field(
proto.MESSAGE,
number=2,
message=duration_pb2.Duration,
)
use_timeout_based_endpointing: bool = proto.Field(
proto.BOOL,
number=3,
)
models: MutableMapping[str, str] = proto.MapField(
proto.STRING,
proto.STRING,
number=5,
)

class DtmfSettings(proto.Message):
r"""Define behaviors for DTMF (dual tone multi frequency).
Expand Down Expand Up @@ -128,6 +176,11 @@ class LoggingSettings(proto.Message):
number=2,
message=gcs.GcsDestination,
)
speech_settings: SpeechSettings = proto.Field(
proto.MESSAGE,
number=3,
message=SpeechSettings,
)
dtmf_settings: DtmfSettings = proto.Field(
proto.MESSAGE,
number=5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from typing import MutableMapping, MutableSequence

from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import struct_pb2 # type: ignore
import proto # type: ignore

from google.cloud.dialogflowcx_v3beta1.types import (
Expand Down Expand Up @@ -122,15 +123,11 @@ class Agent(proto.Message):
speech_to_text_settings (google.cloud.dialogflowcx_v3beta1.types.SpeechToTextSettings):
Speech recognition related settings.
start_flow (str):
Optional. Name of the start flow in this agent. A start flow
will be automatically created when the agent is created, and
can only be deleted by deleting the agent. Format:
Immutable. Name of the start flow in this agent. A start
flow will be automatically created when the agent is
created, and can only be deleted by deleting the agent.
Format:
``projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>``.
Currently only the default start flow with id
"00000000-0000-0000-0000-000000000000" is allowed.
Only one of ``start_flow`` or ``start_playbook`` should be
set, but not both.
start_playbook (str):
Optional. Name of the start playbook in this agent. A start
playbook will be automatically created when the agent is
Expand All @@ -155,6 +152,11 @@ class Agent(proto.Message):
enable_spell_correction (bool):
Indicates if automatic spell correction is
enabled in detect intent requests.
enable_multi_language_training (bool):
Optional. Enable training multi-lingual
models for this agent. These models will be
trained on all the languages supported by the
agent.
locked (bool):
Indicates whether the agent is locked for changes. If the
agent is locked, modifications to the agent will be rejected
Expand All @@ -177,6 +179,9 @@ class Agent(proto.Message):
answer_feedback_settings (google.cloud.dialogflowcx_v3beta1.types.Agent.AnswerFeedbackSettings):
Optional. Answer feedback collection
settings.
personalization_settings (google.cloud.dialogflowcx_v3beta1.types.Agent.PersonalizationSettings):
Optional. Settings for end user
personalization.
"""

class GitIntegrationSettings(proto.Message):
Expand Down Expand Up @@ -272,6 +277,27 @@ class AnswerFeedbackSettings(proto.Message):
number=1,
)

class PersonalizationSettings(proto.Message):
r"""Settings for end user personalization.
Attributes:
default_end_user_metadata (google.protobuf.struct_pb2.Struct):
Optional. Default end user metadata, used when processing
DetectIntent requests. Recommended to be filled as a
template instead of hard-coded value, for example { "age":
"$session.params.age" }. The data will be merged with the
[QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3beta1.QueryParameters.end_user_metadata]
in
[DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.query_params]
during query processing.
"""

default_end_user_metadata: struct_pb2.Struct = proto.Field(
proto.MESSAGE,
number=1,
message=struct_pb2.Struct,
)

name: str = proto.Field(
proto.STRING,
number=1,
Expand Down Expand Up @@ -325,6 +351,10 @@ class AnswerFeedbackSettings(proto.Message):
proto.BOOL,
number=20,
)
enable_multi_language_training: bool = proto.Field(
proto.BOOL,
number=40,
)
locked: bool = proto.Field(
proto.BOOL,
number=27,
Expand Down Expand Up @@ -355,6 +385,11 @@ class AnswerFeedbackSettings(proto.Message):
number=38,
message=AnswerFeedbackSettings,
)
personalization_settings: PersonalizationSettings = proto.Field(
proto.MESSAGE,
number=42,
message=PersonalizationSettings,
)


class ListAgentsRequest(proto.Message):
Expand Down
Loading

0 comments on commit ce2c9ed

Please sign in to comment.