Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit 06fea2a

Browse filesBrowse files
feat: extended StreamingListCallCompanionEvents timeout to 600 seconds (#634)
* feat: extended StreamingListCallCompanionEvents timeout to 600 seconds feat: added debug info for StreamingDetectIntent feat: added GenerateStatelessSummary method PiperOrigin-RevId: 530102437 Source-Link: googleapis/googleapis@cea4ed9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/624b26c099fb2c601741d774015502bef99e1bea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjI0YjI2YzA5OWZiMmM2MDE3NDFkNzc0MDE1NTAyYmVmOTllMWJlYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: extended StreamingListCallCompanionEvents timeout to 600 seconds feat: added debug info for StreamingDetectIntent feat: added GenerateStatelessSummary method PiperOrigin-RevId: 530104294 Source-Link: googleapis/googleapis@92bec94 Source-Link: https://github.com/googleapis/googleapis-gen/commit/69bf7b3d541d1a2f4b30d29add8aebe4e2ad13c5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjliZjdiM2Q1NDFkMWEyZjRiMzBkMjlhZGQ4YWViZTRlMmFkMTNjNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 76ac151 commit 06fea2a
Copy full SHA for 06fea2a
Expand file treeCollapse file tree

39 files changed

+3443
-39
lines changed

‎google/cloud/dialogflow/__init__.py

Copy file name to clipboardExpand all lines: google/cloud/dialogflow/__init__.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@
147147
Conversation,
148148
ConversationPhoneNumber,
149149
CreateConversationRequest,
150+
GenerateStatelessSummaryRequest,
151+
GenerateStatelessSummaryResponse,
150152
GetConversationRequest,
151153
ListConversationsRequest,
152154
ListConversationsResponse,
@@ -322,6 +324,7 @@
322324
UpdateParticipantRequest,
323325
)
324326
from google.cloud.dialogflow_v2.types.session import (
327+
CloudConversationDebuggingInfo,
325328
DetectIntentRequest,
326329
DetectIntentResponse,
327330
EventInput,
@@ -443,6 +446,8 @@
443446
"Conversation",
444447
"ConversationPhoneNumber",
445448
"CreateConversationRequest",
449+
"GenerateStatelessSummaryRequest",
450+
"GenerateStatelessSummaryResponse",
446451
"GetConversationRequest",
447452
"ListConversationsRequest",
448453
"ListConversationsResponse",
@@ -595,6 +600,7 @@
595600
"SuggestSmartRepliesRequest",
596601
"SuggestSmartRepliesResponse",
597602
"UpdateParticipantRequest",
603+
"CloudConversationDebuggingInfo",
598604
"DetectIntentRequest",
599605
"DetectIntentResponse",
600606
"EventInput",

‎google/cloud/dialogflow_v2/__init__.py

Copy file name to clipboardExpand all lines: google/cloud/dialogflow_v2/__init__.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
Conversation,
101101
ConversationPhoneNumber,
102102
CreateConversationRequest,
103+
GenerateStatelessSummaryRequest,
104+
GenerateStatelessSummaryResponse,
103105
GetConversationRequest,
104106
ListConversationsRequest,
105107
ListConversationsResponse,
@@ -273,6 +275,7 @@
273275
UpdateParticipantRequest,
274276
)
275277
from .types.session import (
278+
CloudConversationDebuggingInfo,
276279
DetectIntentRequest,
277280
DetectIntentResponse,
278281
EventInput,
@@ -353,6 +356,7 @@
353356
"BatchUpdateIntentsResponse",
354357
"ClearSuggestionFeatureConfigOperationMetadata",
355358
"ClearSuggestionFeatureConfigRequest",
359+
"CloudConversationDebuggingInfo",
356360
"CompleteConversationRequest",
357361
"Context",
358362
"ContextsClient",
@@ -424,6 +428,8 @@
424428
"FulfillmentsClient",
425429
"GcsDestination",
426430
"GcsSources",
431+
"GenerateStatelessSummaryRequest",
432+
"GenerateStatelessSummaryResponse",
427433
"GetAgentRequest",
428434
"GetContextRequest",
429435
"GetConversationDatasetRequest",

‎google/cloud/dialogflow_v2/gapic_metadata.json

Copy file name to clipboardExpand all lines: google/cloud/dialogflow_v2/gapic_metadata.json
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,11 @@
704704
"create_conversation"
705705
]
706706
},
707+
"GenerateStatelessSummary": {
708+
"methods": [
709+
"generate_stateless_summary"
710+
]
711+
},
707712
"GetConversation": {
708713
"methods": [
709714
"get_conversation"
@@ -739,6 +744,11 @@
739744
"create_conversation"
740745
]
741746
},
747+
"GenerateStatelessSummary": {
748+
"methods": [
749+
"generate_stateless_summary"
750+
]
751+
},
742752
"GetConversation": {
743753
"methods": [
744754
"get_conversation"
@@ -774,6 +784,11 @@
774784
"create_conversation"
775785
]
776786
},
787+
"GenerateStatelessSummary": {
788+
"methods": [
789+
"generate_stateless_summary"
790+
]
791+
},
777792
"GetConversation": {
778793
"methods": [
779794
"get_conversation"

‎google/cloud/dialogflow_v2/services/conversations/async_client.py

Copy file name to clipboardExpand all lines: google/cloud/dialogflow_v2/services/conversations/async_client.py
+116Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,36 @@ class ConversationsAsyncClient:
6666
DEFAULT_ENDPOINT = ConversationsClient.DEFAULT_ENDPOINT
6767
DEFAULT_MTLS_ENDPOINT = ConversationsClient.DEFAULT_MTLS_ENDPOINT
6868

69+
agent_path = staticmethod(ConversationsClient.agent_path)
70+
parse_agent_path = staticmethod(ConversationsClient.parse_agent_path)
6971
answer_record_path = staticmethod(ConversationsClient.answer_record_path)
7072
parse_answer_record_path = staticmethod(
7173
ConversationsClient.parse_answer_record_path
7274
)
7375
conversation_path = staticmethod(ConversationsClient.conversation_path)
7476
parse_conversation_path = staticmethod(ConversationsClient.parse_conversation_path)
77+
conversation_model_path = staticmethod(ConversationsClient.conversation_model_path)
78+
parse_conversation_model_path = staticmethod(
79+
ConversationsClient.parse_conversation_model_path
80+
)
7581
conversation_profile_path = staticmethod(
7682
ConversationsClient.conversation_profile_path
7783
)
7884
parse_conversation_profile_path = staticmethod(
7985
ConversationsClient.parse_conversation_profile_path
8086
)
87+
cx_security_settings_path = staticmethod(
88+
ConversationsClient.cx_security_settings_path
89+
)
90+
parse_cx_security_settings_path = staticmethod(
91+
ConversationsClient.parse_cx_security_settings_path
92+
)
93+
document_path = staticmethod(ConversationsClient.document_path)
94+
parse_document_path = staticmethod(ConversationsClient.parse_document_path)
95+
knowledge_base_path = staticmethod(ConversationsClient.knowledge_base_path)
96+
parse_knowledge_base_path = staticmethod(
97+
ConversationsClient.parse_knowledge_base_path
98+
)
8199
message_path = staticmethod(ConversationsClient.message_path)
82100
parse_message_path = staticmethod(ConversationsClient.parse_message_path)
83101
common_billing_account_path = staticmethod(
@@ -939,6 +957,104 @@ async def sample_suggest_conversation_summary():
939957
# Done; return the response.
940958
return response
941959

960+
async def generate_stateless_summary(
961+
self,
962+
request: Optional[
963+
Union[conversation.GenerateStatelessSummaryRequest, dict]
964+
] = None,
965+
*,
966+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
967+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
968+
metadata: Sequence[Tuple[str, str]] = (),
969+
) -> conversation.GenerateStatelessSummaryResponse:
970+
r"""Generates and returns a summary for a conversation
971+
that does not have a resource created for it.
972+
973+
.. code-block:: python
974+
975+
# This snippet has been automatically generated and should be regarded as a
976+
# code template only.
977+
# It will require modifications to work:
978+
# - It may require correct/in-range values for request initialization.
979+
# - It may require specifying regional endpoints when creating the service
980+
# client as shown in:
981+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
982+
from google.cloud import dialogflow_v2
983+
984+
async def sample_generate_stateless_summary():
985+
# Create a client
986+
client = dialogflow_v2.ConversationsAsyncClient()
987+
988+
# Initialize request argument(s)
989+
stateless_conversation = dialogflow_v2.MinimalConversation()
990+
stateless_conversation.messages.content = "content_value"
991+
stateless_conversation.parent = "parent_value"
992+
993+
conversation_profile = dialogflow_v2.ConversationProfile()
994+
conversation_profile.display_name = "display_name_value"
995+
996+
request = dialogflow_v2.GenerateStatelessSummaryRequest(
997+
stateless_conversation=stateless_conversation,
998+
conversation_profile=conversation_profile,
999+
)
1000+
1001+
# Make the request
1002+
response = await client.generate_stateless_summary(request=request)
1003+
1004+
# Handle the response
1005+
print(response)
1006+
1007+
Args:
1008+
request (Optional[Union[google.cloud.dialogflow_v2.types.GenerateStatelessSummaryRequest, dict]]):
1009+
The request object. The request message for
1010+
[Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
1011+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
1012+
should be retried.
1013+
timeout (float): The timeout for this request.
1014+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1015+
sent along with the request as metadata.
1016+
1017+
Returns:
1018+
google.cloud.dialogflow_v2.types.GenerateStatelessSummaryResponse:
1019+
The response message for
1020+
[Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
1021+
1022+
"""
1023+
# Create or coerce a protobuf request object.
1024+
request = conversation.GenerateStatelessSummaryRequest(request)
1025+
1026+
# Wrap the RPC method; this adds retry and timeout information,
1027+
# and friendly error handling.
1028+
rpc = gapic_v1.method_async.wrap_method(
1029+
self._client._transport.generate_stateless_summary,
1030+
default_timeout=None,
1031+
client_info=DEFAULT_CLIENT_INFO,
1032+
)
1033+
1034+
# Certain fields should be provided within the metadata header;
1035+
# add these here.
1036+
metadata = tuple(metadata) + (
1037+
gapic_v1.routing_header.to_grpc_metadata(
1038+
(
1039+
(
1040+
"stateless_conversation.parent",
1041+
request.stateless_conversation.parent,
1042+
),
1043+
)
1044+
),
1045+
)
1046+
1047+
# Send the request.
1048+
response = await rpc(
1049+
request,
1050+
retry=retry,
1051+
timeout=timeout,
1052+
metadata=metadata,
1053+
)
1054+
1055+
# Done; return the response.
1056+
return response
1057+
9421058
async def list_operations(
9431059
self,
9441060
request: Optional[operations_pb2.ListOperationsRequest] = None,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.