Content-Length: 1259724 | pFad | https://github.com/googleapis/google-cloud-python/commit/7b2da60b07d6fab4fc46254a6c2557006df5fcba

85 feat: [google-cloud-dialogflow-cx] exposed Zone Separation & Zone Iso… · googleapis/google-cloud-python@7b2da60 · GitHub
Skip to content

Commit 7b2da60

Browse files
feat: [google-cloud-dialogflow-cx] exposed Zone Separation & Zone Isolation status of an agent (#13561)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat(v3): exposed Zone Separation & Zone Isolation status of an agent feat(v3): added support for document_processing_mode docs(v3): clarified wording around use_timeout_based_endpointing docs(v3): clarified wording around StreamingDetectIntentRequest feat(v3beta1): added support for handlers END_COMMIT_OVERRIDE PiperOrigin-RevId: 731475610 Source-Link: googleapis/googleapis@b7c1119 Source-Link: googleapis/googleapis-gen@2aa8fb4 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjJhYThmYjRlYjkyNjcyYTkxMzkzNGU2YTU2MmE2ZWVlZGY3OWY2NDAifQ== BEGIN_NESTED_COMMIT feat: [google-cloud-dialogflow-cx] added support for handlers PiperOrigin-RevId: 731109606 Source-Link: googleapis/googleapis@8ed13a0 Source-Link: googleapis/googleapis-gen@993b7d8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijk5M2I3ZDgxNzRjYzBkNGMzOTU2NzgzM2E3MWEyYjNhY2ViY2ViMGQifQ== END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ff7c472 commit 7b2da60

File tree

22 files changed

+668
-76
lines changed

22 files changed

+668
-76
lines changed

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
DataStoreConnection,
129129
DataStoreConnectionSignals,
130130
DataStoreType,
131+
DocumentProcessingMode,
131132
)
132133
from google.cloud.dialogflowcx_v3.types.deployment import (
133134
Deployment,
@@ -443,6 +444,7 @@
443444
"DataStoreConnection",
444445
"DataStoreConnectionSignals",
445446
"DataStoreType",
447+
"DocumentProcessingMode",
446448
"Deployment",
447449
"GetDeploymentRequest",
448450
"ListDeploymentsRequest",

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
DataStoreConnection,
8787
DataStoreConnectionSignals,
8888
DataStoreType,
89+
DocumentProcessingMode,
8990
)
9091
from .types.deployment import (
9192
Deployment,
@@ -407,6 +408,7 @@
407408
"DeploymentsClient",
408409
"DetectIntentRequest",
409410
"DetectIntentResponse",
411+
"DocumentProcessingMode",
410412
"DtmfInput",
411413
"EntityType",
412414
"EntityTypesClient",

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/async_client.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -615,31 +615,25 @@ def request_generator():
615615
[StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]
616616
method.
617617
618-
Multiple response messages (N) can be returned in
619-
order.
620-
621-
The first (N-1) responses set either the
622-
recognition_result or detect_intent_response field,
623-
depending on the request:
618+
Multiple response messages can be returned in order:
624619
625620
- If the
626621
StreamingDetectIntentRequest.query_input.audio
627-
field was set, and the
628-
StreamingDetectIntentRequest.enable_partial_response
629-
field was false, the recognition_result field is
630-
populated for each of the (N-1) responses. See the
631-
[StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult]
632-
message for details about the result message
633-
sequence.
622+
field was set, the first M messages contain
623+
recognition_result. Each recognition_result
624+
represents a more complete transcript of what the
625+
user said. The last recognition_result has
626+
is_final set to true.
634627
- If the
635628
StreamingDetectIntentRequest.enable_partial_response
636629
field was true, the detect_intent_response field
637-
is populated for each of the (N-1) responses,
638-
where 1 <= N <= 4. These responses set the
630+
is populated for each of the following N
631+
responses, where 0 <= N <= 5. These responses set
632+
the
639633
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
640634
field to PARTIAL.
641635
642-
For the final Nth response message, the
636+
For the last response message, the
643637
detect_intent_response is fully populated, and
644638
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
645639
is set to FINAL.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/sessions/client.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,31 +1238,25 @@ def request_generator():
12381238
[StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]
12391239
method.
12401240
1241-
Multiple response messages (N) can be returned in
1242-
order.
1243-
1244-
The first (N-1) responses set either the
1245-
recognition_result or detect_intent_response field,
1246-
depending on the request:
1241+
Multiple response messages can be returned in order:
12471242
12481243
- If the
12491244
StreamingDetectIntentRequest.query_input.audio
1250-
field was set, and the
1251-
StreamingDetectIntentRequest.enable_partial_response
1252-
field was false, the recognition_result field is
1253-
populated for each of the (N-1) responses. See the
1254-
[StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult]
1255-
message for details about the result message
1256-
sequence.
1245+
field was set, the first M messages contain
1246+
recognition_result. Each recognition_result
1247+
represents a more complete transcript of what the
1248+
user said. The last recognition_result has
1249+
is_final set to true.
12571250
- If the
12581251
StreamingDetectIntentRequest.enable_partial_response
12591252
field was true, the detect_intent_response field
1260-
is populated for each of the (N-1) responses,
1261-
where 1 <= N <= 4. These responses set the
1253+
is populated for each of the following N
1254+
responses, where 0 <= N <= 5. These responses set
1255+
the
12621256
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
12631257
field to PARTIAL.
12641258
1265-
For the final Nth response message, the
1259+
For the last response message, the
12661260
detect_intent_response is fully populated, and
12671261
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
12681262
is set to FINAL.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
DataStoreConnection,
5656
DataStoreConnectionSignals,
5757
DataStoreType,
58+
DocumentProcessingMode,
5859
)
5960
from .deployment import (
6061
Deployment,
@@ -333,6 +334,7 @@
333334
"DataStoreConnection",
334335
"DataStoreConnectionSignals",
335336
"DataStoreType",
337+
"DocumentProcessingMode",
336338
"Deployment",
337339
"GetDeploymentRequest",
338340
"ListDeploymentsRequest",

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/advanced_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class SpeechSettings(proto.Message):
8989
Timeout before detecting no speech.
9090
use_timeout_based_endpointing (bool):
9191
Use timeout based endpointing, interpreting
92-
endpointer sensitivy as seconds of timeout
92+
endpointer sensitivity as seconds of timeout
9393
value.
9494
models (MutableMapping[str, str]):
9595
Mapping from language to Speech-to-Text model. The mapped

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/agent.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ class Agent(proto.Message):
174174
client_certificate_settings (google.cloud.dialogflowcx_v3.types.Agent.ClientCertificateSettings):
175175
Optional. Settings for custom client
176176
certificates.
177+
satisfies_pzs (bool):
178+
Optional. Output only. A read only boolean
179+
field reflecting Zone Separation status of the
180+
agent.
181+
182+
This field is a member of `oneof`_ ``_satisfies_pzs``.
183+
satisfies_pzi (bool):
184+
Optional. Output only. A read only boolean
185+
field reflecting Zone Isolation status of the
186+
agent.
187+
188+
This field is a member of `oneof`_ ``_satisfies_pzi``.
177189
"""
178190

179191
class GitIntegrationSettings(proto.Message):
@@ -416,6 +428,16 @@ class ClientCertificateSettings(proto.Message):
416428
number=43,
417429
message=ClientCertificateSettings,
418430
)
431+
satisfies_pzs: bool = proto.Field(
432+
proto.BOOL,
433+
number=45,
434+
optional=True,
435+
)
436+
satisfies_pzi: bool = proto.Field(
437+
proto.BOOL,
438+
number=46,
439+
optional=True,
440+
)
419441

420442

421443
class ListAgentsRequest(proto.Message):

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/audio_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class BargeInConfig(proto.Message):
274274
275275
The client provides this configuration in terms of the durations of
276276
those two phases. The durations are measured in terms of the audio
277-
length from the the start of the input audio.
277+
length from the start of the input audio.
278278
279279
No-speech event is a response with END_OF_UTTERANCE without any
280280
transcript following up.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/data_store_connection.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package="google.cloud.dialogflow.cx.v3",
2424
manifest={
2525
"DataStoreType",
26+
"DocumentProcessingMode",
2627
"DataStoreConnection",
2728
"DataStoreConnectionSignals",
2829
},
@@ -54,6 +55,24 @@ class DataStoreType(proto.Enum):
5455
STRUCTURED = 3
5556

5657

58+
class DocumentProcessingMode(proto.Enum):
59+
r"""The document processing mode of the data store.
60+
61+
Values:
62+
DOCUMENT_PROCESSING_MODE_UNSPECIFIED (0):
63+
Not specified. This should be set for STRUCTURED type data
64+
stores. Due to legacy reasons this is considered as
65+
DOCUMENTS for STRUCTURED and PUBLIC_WEB data stores.
66+
DOCUMENTS (1):
67+
Documents are processed as documents.
68+
CHUNKS (2):
69+
Documents are converted to chunks.
70+
"""
71+
DOCUMENT_PROCESSING_MODE_UNSPECIFIED = 0
72+
DOCUMENTS = 1
73+
CHUNKS = 2
74+
75+
5776
class DataStoreConnection(proto.Message):
5877
r"""A data store connection. It represents a data store in
5978
Discovery Engine and the type of the contents it contains.
@@ -65,6 +84,11 @@ class DataStoreConnection(proto.Message):
6584
The full name of the referenced data store. Formats:
6685
``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}``
6786
``projects/{project}/locations/{location}/dataStores/{data_store}``
87+
document_processing_mode (google.cloud.dialogflowcx_v3.types.DocumentProcessingMode):
88+
The document processing mode for the data store connection.
89+
Should only be set for PUBLIC_WEB and UNSTRUCTURED data
90+
stores. If not set it is considered as DOCUMENTS, as this is
91+
the legacy mode.
6892
"""
6993

7094
data_store_type: "DataStoreType" = proto.Field(
@@ -76,6 +100,11 @@ class DataStoreConnection(proto.Message):
76100
proto.STRING,
77101
number=2,
78102
)
103+
document_processing_mode: "DocumentProcessingMode" = proto.Field(
104+
proto.ENUM,
105+
number=4,
106+
enum="DocumentProcessingMode",
107+
)
79108

80109

81110
class DataStoreConnectionSignals(proto.Message):

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class Flow(proto.Message):
164164
of the current page. Transition routes defined in the
165165
page have higher priority than those defined in the flow.
166166
167-
TransitionRoutes are evalauted in the following order:
167+
TransitionRoutes are evaluated in the following order:
168168
169169
- TransitionRoutes with intent specified.
170170
- TransitionRoutes with only condition specified.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class Page(proto.Message):
113113
flow, or another flow.
114114
115115
When we are in a certain page, the TransitionRoutes are
116-
evalauted in the following order:
116+
evaluated in the following order:
117117
118118
- TransitionRoutes defined in the page with intent
119119
specified.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/types/session.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -577,28 +577,23 @@ class StreamingDetectIntentResponse(proto.Message):
577577
[StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent]
578578
method.
579579
580-
Multiple response messages (N) can be returned in order.
581-
582-
The first (N-1) responses set either the ``recognition_result`` or
583-
``detect_intent_response`` field, depending on the request:
580+
Multiple response messages can be returned in order:
584581
585582
- If the ``StreamingDetectIntentRequest.query_input.audio`` field
586-
was set, and the
587-
``StreamingDetectIntentRequest.enable_partial_response`` field
588-
was false, the ``recognition_result`` field is populated for each
589-
of the (N-1) responses. See the
590-
[StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult]
591-
message for details about the result message sequence.
583+
was set, the first M messages contain ``recognition_result``.
584+
Each ``recognition_result`` represents a more complete transcript
585+
of what the user said. The last ``recognition_result`` has
586+
``is_final`` set to ``true``.
592587
593588
- If the ``StreamingDetectIntentRequest.enable_partial_response``
594589
field was true, the ``detect_intent_response`` field is populated
595-
for each of the (N-1) responses, where 1 <= N <= 4. These
590+
for each of the following N responses, where 0 <= N <= 5. These
596591
responses set the
597592
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
598593
field to ``PARTIAL``.
599594
600-
For the final Nth response message, the ``detect_intent_response``
601-
is fully populated, and
595+
For the last response message, the ``detect_intent_response`` is
596+
fully populated, and
602597
[DetectIntentResponse.response_type][google.cloud.dialogflow.cx.v3.DetectIntentResponse.response_type]
603598
is set to ``FINAL``.
604599
@@ -1025,9 +1020,20 @@ class SearchConfig(proto.Message):
10251020
boost_specs (MutableSequence[google.cloud.dialogflowcx_v3.types.BoostSpecs]):
10261021
Optional. Boosting configuration for the
10271022
datastores.
1023+
Maps from datastore name to their boost
1024+
configuration. Do not specify more than one
1025+
BoostSpecs for each datastore name. If multiple
1026+
BoostSpecs are provided for the same datastore
1027+
name, the behavior is undefined.
10281028
filter_specs (MutableSequence[google.cloud.dialogflowcx_v3.types.FilterSpecs]):
10291029
Optional. Filter configuration for the
10301030
datastores.
1031+
Maps from datastore name to the filter
1032+
expression for that datastore. Do not specify
1033+
more than one FilterSpecs for each datastore
1034+
name. If multiple FilterSpecs are provided for
1035+
the same datastore name, the behavior is
1036+
undefined.
10311037
"""
10321038

10331039
boost_specs: MutableSequence["BoostSpecs"] = proto.RepeatedField(
@@ -1052,7 +1058,7 @@ class BoostSpec(proto.Message):
10521058
condition_boost_specs (MutableSequence[google.cloud.dialogflowcx_v3.types.BoostSpec.ConditionBoostSpec]):
10531059
Optional. Condition boost specifications. If
10541060
a document matches multiple conditions in the
1055-
specifictions, boost scores from these
1061+
specifications, boost scores from these
10561062
specifications are all applied and combined in a
10571063
non-linear way. Maximum number of specifications
10581064
is 20.
@@ -1540,11 +1546,9 @@ class QueryResult(proto.Message):
15401546
rating controls are need to be shown for the
15411547
response in the Dialogflow Messenger widget.
15421548
data_store_connection_signals (google.cloud.dialogflowcx_v3.types.DataStoreConnectionSignals):
1543-
Optional. Data store connection feature output signals.
1544-
Filled only when data stores are involved in serving the
1545-
query and
1546-
DetectIntentRequest.populate_data_store_connection_signals
1547-
is set to true in the request.
1549+
Optional. Data store connection feature
1550+
output signals. Filled only when data stores are
1551+
involved in serving the query.
15481552
"""
15491553

15501554
text: str = proto.Field(

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
DeletePlaybookVersionRequest,
249249
GetPlaybookRequest,
250250
GetPlaybookVersionRequest,
251+
Handler,
251252
ListPlaybooksRequest,
252253
ListPlaybooksResponse,
253254
ListPlaybookVersionsRequest,
@@ -557,6 +558,7 @@
557558
"GetTransitionRouteGroupRequest",
558559
"GetVersionRequest",
559560
"GetWebhookRequest",
561+
"Handler",
560562
"ImportEntityTypesMetadata",
561563
"ImportEntityTypesRequest",
562564
"ImportEntityTypesResponse",

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/playbooks/async_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ class PlaybooksAsyncClient:
9898
)
9999
tool_path = staticmethod(PlaybooksClient.tool_path)
100100
parse_tool_path = staticmethod(PlaybooksClient.parse_tool_path)
101+
webhook_path = staticmethod(PlaybooksClient.webhook_path)
102+
parse_webhook_path = staticmethod(PlaybooksClient.parse_webhook_path)
101103
common_billing_account_path = staticmethod(
102104
PlaybooksClient.common_billing_account_path
103105
)

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3beta1/services/playbooks/client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,30 @@ def parse_tool_path(path: str) -> Dict[str, str]:
331331
)
332332
return m.groupdict() if m else {}
333333

334+
@staticmethod
335+
def webhook_path(
336+
project: str,
337+
location: str,
338+
agent: str,
339+
webhook: str,
340+
) -> str:
341+
"""Returns a fully-qualified webhook string."""
342+
return "projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}".format(
343+
project=project,
344+
location=location,
345+
agent=agent,
346+
webhook=webhook,
347+
)
348+
349+
@staticmethod
350+
def parse_webhook_path(path: str) -> Dict[str, str]:
351+
"""Parses a webhook path into its component segments."""
352+
m = re.match(
353+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/agents/(?P<agent>.+?)/webhooks/(?P<webhook>.+?)$",
354+
path,
355+
)
356+
return m.groupdict() if m else {}
357+
334358
@staticmethod
335359
def common_billing_account_path(
336360
billing_account: str,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-python/commit/7b2da60b07d6fab4fc46254a6c2557006df5fcba

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy