Skip to content

Commit 1dbd098

Browse files
chore: librarian generate pull request: 20251020T144653Z (#14780)
BEGIN_COMMIT_OVERRIDE BEGIN_NESTED_COMMIT fix: Add labels for additional Sessions identification PiperOrigin-RevId: 820710306 Library-IDs: google-cloud-discoveryengine Source-link: [googleapis/googleapis@b153a918](googleapis/googleapis@b153a918) END_NESTED_COMMIT BEGIN_NESTED_COMMIT fix: Include AssistAnswer as a part of the Session PiperOrigin-RevId: 820710306 Library-IDs: google-cloud-discoveryengine Source-link: [googleapis/googleapis@b153a918](googleapis/googleapis@b153a918) END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: add `relax_safety_filters` proto field for Gemini TTS PiperOrigin-RevId: 820700239 Library-IDs: google-cloud-texttospeech Source-link: [googleapis/googleapis@59aac0a6](googleapis/googleapis@59aac0a6) END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat: add `relax_safety_filters` proto field for Gemini TTS PiperOrigin-RevId: 820699890 Library-IDs: google-cloud-texttospeech Source-link: [googleapis/googleapis@50d4eb9c](googleapis/googleapis@50d4eb9c) END_NESTED_COMMIT END_COMMIT_OVERRIDE This pull request is generated with proto changes between [googleapis/googleapis@b153a918](googleapis/googleapis@b153a91) (exclusive) and [googleapis/googleapis@b153a918](googleapis/googleapis@b153a91) (inclusive). Librarian Version: v0.0.0-20251017210042-739ce0d58362 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator:latest ## Generation failed for - google-apps-chat - google-cloud-org-policy --------- Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent a118f82 commit 1dbd098

File tree

10 files changed

+438
-3
lines changed

10 files changed

+438
-3
lines changed

.librarian/state.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ libraries:
16941694
tag_format: '{id}-v{version}'
16951695
- id: google-cloud-discoveryengine
16961696
version: 0.14.0
1697-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
1697+
last_generated_commit: c288189b43c016dd3cf1ec73ce3cadee8b732f07
16981698
apis:
16991699
- path: google/cloud/discoveryengine/v1
17001700
service_config: discoveryengine_v1.yaml
@@ -3678,7 +3678,7 @@ libraries:
36783678
tag_format: '{id}-v{version}'
36793679
- id: google-cloud-texttospeech
36803680
version: 2.32.0
3681-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
3681+
last_generated_commit: c288189b43c016dd3cf1ec73ce3cadee8b732f07
36823682
apis:
36833683
- path: google/cloud/texttospeech/v1
36843684
service_config: texttospeech_v1.yaml

packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/async_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class ConversationalSearchServiceAsyncClient:
9797
parse_answer_path = staticmethod(
9898
ConversationalSearchServiceClient.parse_answer_path
9999
)
100+
assist_answer_path = staticmethod(
101+
ConversationalSearchServiceClient.assist_answer_path
102+
)
103+
parse_assist_answer_path = staticmethod(
104+
ConversationalSearchServiceClient.parse_assist_answer_path
105+
)
100106
chunk_path = staticmethod(ConversationalSearchServiceClient.chunk_path)
101107
parse_chunk_path = staticmethod(ConversationalSearchServiceClient.parse_chunk_path)
102108
conversation_path = staticmethod(

packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/conversational_search_service/client.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,34 @@ def parse_answer_path(path: str) -> Dict[str, str]:
243243
)
244244
return m.groupdict() if m else {}
245245

246+
@staticmethod
247+
def assist_answer_path(
248+
project: str,
249+
location: str,
250+
collection: str,
251+
engine: str,
252+
session: str,
253+
assist_answer: str,
254+
) -> str:
255+
"""Returns a fully-qualified assist_answer string."""
256+
return "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}".format(
257+
project=project,
258+
location=location,
259+
collection=collection,
260+
engine=engine,
261+
session=session,
262+
assist_answer=assist_answer,
263+
)
264+
265+
@staticmethod
266+
def parse_assist_answer_path(path: str) -> Dict[str, str]:
267+
"""Parses a assist_answer path into its component segments."""
268+
m = re.match(
269+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/collections/(?P<collection>.+?)/engines/(?P<engine>.+?)/sessions/(?P<session>.+?)/assistAnswers/(?P<assist_answer>.+?)$",
270+
path,
271+
)
272+
return m.groupdict() if m else {}
273+
246274
@staticmethod
247275
def chunk_path(
248276
project: str,

packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/async_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ class SessionServiceAsyncClient:
8282

8383
answer_path = staticmethod(SessionServiceClient.answer_path)
8484
parse_answer_path = staticmethod(SessionServiceClient.parse_answer_path)
85+
assist_answer_path = staticmethod(SessionServiceClient.assist_answer_path)
86+
parse_assist_answer_path = staticmethod(
87+
SessionServiceClient.parse_assist_answer_path
88+
)
8589
chunk_path = staticmethod(SessionServiceClient.chunk_path)
8690
parse_chunk_path = staticmethod(SessionServiceClient.parse_chunk_path)
8791
data_store_path = staticmethod(SessionServiceClient.data_store_path)

packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/session_service/client.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,34 @@ def parse_answer_path(path: str) -> Dict[str, str]:
229229
)
230230
return m.groupdict() if m else {}
231231

232+
@staticmethod
233+
def assist_answer_path(
234+
project: str,
235+
location: str,
236+
collection: str,
237+
engine: str,
238+
session: str,
239+
assist_answer: str,
240+
) -> str:
241+
"""Returns a fully-qualified assist_answer string."""
242+
return "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}".format(
243+
project=project,
244+
location=location,
245+
collection=collection,
246+
engine=engine,
247+
session=session,
248+
assist_answer=assist_answer,
249+
)
250+
251+
@staticmethod
252+
def parse_assist_answer_path(path: str) -> Dict[str, str]:
253+
"""Parses a assist_answer path into its component segments."""
254+
m = re.match(
255+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/collections/(?P<collection>.+?)/engines/(?P<engine>.+?)/sessions/(?P<session>.+?)/assistAnswers/(?P<assist_answer>.+?)$",
256+
path,
257+
)
258+
return m.groupdict() if m else {}
259+
232260
@staticmethod
233261
def chunk_path(
234262
project: str,

packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/types/session.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import proto # type: ignore
2222

2323
from google.cloud.discoveryengine_v1.types import answer as gcd_answer
24+
from google.cloud.discoveryengine_v1.types import assist_answer
2425

2526
__protobuf__ = proto.module(
2627
package="google.cloud.discoveryengine.v1",
@@ -50,6 +51,9 @@ class Session(proto.Message):
5051
A unique identifier for tracking users.
5152
turns (MutableSequence[google.cloud.discoveryengine_v1.types.Session.Turn]):
5253
Turns.
54+
labels (MutableSequence[str]):
55+
Optional. The labels for the session.
56+
Can be set as filter in ListSessionsRequest.
5357
start_time (google.protobuf.timestamp_pb2.Timestamp):
5458
Output only. The time the session started.
5559
end_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -93,6 +97,13 @@ class Turn(proto.Message):
9397
[GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
9498
is set to true, this field will be populated when getting
9599
answer query session.
100+
detailed_assist_answer (google.cloud.discoveryengine_v1.types.AssistAnswer):
101+
Output only. In
102+
[ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
103+
API, if
104+
[GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
105+
is set to true, this field will be populated when getting
106+
assistant session.
96107
query_config (MutableMapping[str, str]):
97108
Optional. Represents metadata related to the
98109
query config, for example LLM model and version
@@ -115,6 +126,11 @@ class Turn(proto.Message):
115126
number=7,
116127
message=gcd_answer.Answer,
117128
)
129+
detailed_assist_answer: assist_answer.AssistAnswer = proto.Field(
130+
proto.MESSAGE,
131+
number=8,
132+
message=assist_answer.AssistAnswer,
133+
)
118134
query_config: MutableMapping[str, str] = proto.MapField(
119135
proto.STRING,
120136
proto.STRING,
@@ -143,6 +159,10 @@ class Turn(proto.Message):
143159
number=4,
144160
message=Turn,
145161
)
162+
labels: MutableSequence[str] = proto.RepeatedField(
163+
proto.STRING,
164+
number=9,
165+
)
146166
start_time: timestamp_pb2.Timestamp = proto.Field(
147167
proto.MESSAGE,
148168
number=5,

0 commit comments

Comments
 (0)