google-cloud-discovery_engine-v1 2.3.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/README.md +4 -4
- data/lib/google/cloud/discovery_engine/v1/assistant_service/client.rb +509 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/paths.rb +169 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/client.rb +478 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/rest/service_stub.rb +137 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/assistant_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +16 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +16 -4
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -2
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +204 -30
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +204 -30
- data/lib/google/cloud/discovery_engine/v1/session_service/client.rb +920 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/paths.rb +330 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/rest/client.rb +859 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/rest/service_stub.rb +462 -0
- data/lib/google/cloud/discovery_engine/v1/session_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/session_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +2 -2
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +2 -2
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +5 -3
- data/lib/google/cloud/discoveryengine/v1/assist_answer_pb.rb +59 -0
- data/lib/google/cloud/discoveryengine/v1/assistant_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/assistant_service_pb.rb +62 -0
- data/lib/google/cloud/discoveryengine/v1/assistant_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/session_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/session_service_services_pb.rb +64 -0
- data/proto_docs/google/cloud/discoveryengine/v1/assist_answer.rb +278 -0
- data/proto_docs/google/cloud/discoveryengine/v1/assistant.rb +39 -0
- data/proto_docs/google/cloud/discoveryengine/v1/assistant_service.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +15 -3
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +164 -14
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +20 -4
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +2 -2
- metadata +26 -3
@@ -0,0 +1,278 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# AssistAnswer resource, main part of
|
25
|
+
# [AssistResponse][google.cloud.discoveryengine.v1.AssistResponse].
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Immutable. Resource name of the `AssistAnswer`.
|
29
|
+
# Format:
|
30
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
|
31
|
+
#
|
32
|
+
# This field must be a UTF-8 encoded string with a length limit of 1024
|
33
|
+
# characters.
|
34
|
+
# @!attribute [rw] state
|
35
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::State]
|
36
|
+
# State of the answer generation.
|
37
|
+
# @!attribute [rw] replies
|
38
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::Reply>]
|
39
|
+
# Replies of the assistant.
|
40
|
+
# @!attribute [rw] assist_skipped_reasons
|
41
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistAnswer::AssistSkippedReason>]
|
42
|
+
# Reasons for not answering the assist call.
|
43
|
+
class AssistAnswer
|
44
|
+
include ::Google::Protobuf::MessageExts
|
45
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
46
|
+
|
47
|
+
# One part of the multi-part response of the assist call.
|
48
|
+
# @!attribute [rw] grounded_content
|
49
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent]
|
50
|
+
# Possibly grounded response text or media from the assistant.
|
51
|
+
class Reply
|
52
|
+
include ::Google::Protobuf::MessageExts
|
53
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
54
|
+
end
|
55
|
+
|
56
|
+
# State of the answer generation.
|
57
|
+
module State
|
58
|
+
# Unknown.
|
59
|
+
STATE_UNSPECIFIED = 0
|
60
|
+
|
61
|
+
# Assist operation is currently in progress.
|
62
|
+
IN_PROGRESS = 1
|
63
|
+
|
64
|
+
# Assist operation has failed.
|
65
|
+
FAILED = 2
|
66
|
+
|
67
|
+
# Assist operation has succeeded.
|
68
|
+
SUCCEEDED = 3
|
69
|
+
|
70
|
+
# Assist operation has been skipped.
|
71
|
+
SKIPPED = 4
|
72
|
+
end
|
73
|
+
|
74
|
+
# Possible reasons for not answering an assist call.
|
75
|
+
module AssistSkippedReason
|
76
|
+
# Default value. Skip reason is not specified.
|
77
|
+
ASSIST_SKIPPED_REASON_UNSPECIFIED = 0
|
78
|
+
|
79
|
+
# The assistant ignored the query, because it did not appear to be
|
80
|
+
# answer-seeking.
|
81
|
+
NON_ASSIST_SEEKING_QUERY_IGNORED = 1
|
82
|
+
|
83
|
+
# The assistant ignored the query or refused to answer because of a
|
84
|
+
# customer policy violation (e.g., the query or the answer contained a
|
85
|
+
# banned phrase).
|
86
|
+
CUSTOMER_POLICY_VIOLATION = 2
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Multi-modal content.
|
91
|
+
# @!attribute [rw] text
|
92
|
+
# @return [::String]
|
93
|
+
# Inline text.
|
94
|
+
#
|
95
|
+
# Note: The following fields are mutually exclusive: `text`, `inline_data`, `file`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
96
|
+
# @!attribute [rw] inline_data
|
97
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::Blob]
|
98
|
+
# Inline binary data.
|
99
|
+
#
|
100
|
+
# Note: The following fields are mutually exclusive: `inline_data`, `text`, `file`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
101
|
+
# @!attribute [rw] file
|
102
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::File]
|
103
|
+
# A file, e.g., an audio summary.
|
104
|
+
#
|
105
|
+
# Note: The following fields are mutually exclusive: `file`, `text`, `inline_data`, `executable_code`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
106
|
+
# @!attribute [rw] executable_code
|
107
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::ExecutableCode]
|
108
|
+
# Code generated by the model that is meant to be executed.
|
109
|
+
#
|
110
|
+
# Note: The following fields are mutually exclusive: `executable_code`, `text`, `inline_data`, `file`, `code_execution_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
111
|
+
# @!attribute [rw] code_execution_result
|
112
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::CodeExecutionResult]
|
113
|
+
# Result of executing an ExecutableCode.
|
114
|
+
#
|
115
|
+
# Note: The following fields are mutually exclusive: `code_execution_result`, `text`, `inline_data`, `file`, `executable_code`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
116
|
+
# @!attribute [rw] role
|
117
|
+
# @return [::String]
|
118
|
+
# The producer of the content. Can be "model" or "user".
|
119
|
+
# @!attribute [rw] thought
|
120
|
+
# @return [::Boolean]
|
121
|
+
# Optional. Indicates if the part is thought from the model.
|
122
|
+
class AssistantContent
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
|
126
|
+
# Inline blob.
|
127
|
+
# @!attribute [rw] mime_type
|
128
|
+
# @return [::String]
|
129
|
+
# Required. The media type (MIME type) of the generated data.
|
130
|
+
# @!attribute [rw] data
|
131
|
+
# @return [::String]
|
132
|
+
# Required. Raw bytes.
|
133
|
+
class Blob
|
134
|
+
include ::Google::Protobuf::MessageExts
|
135
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
|
+
end
|
137
|
+
|
138
|
+
# A file, e.g., an audio summary.
|
139
|
+
# @!attribute [rw] mime_type
|
140
|
+
# @return [::String]
|
141
|
+
# Required. The media type (MIME type) of the file.
|
142
|
+
# @!attribute [rw] file_id
|
143
|
+
# @return [::String]
|
144
|
+
# Required. The file ID.
|
145
|
+
class File
|
146
|
+
include ::Google::Protobuf::MessageExts
|
147
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
148
|
+
end
|
149
|
+
|
150
|
+
# Code generated by the model that is meant to be executed by the model.
|
151
|
+
# @!attribute [rw] code
|
152
|
+
# @return [::String]
|
153
|
+
# Required. The code content. Currently only supports Python.
|
154
|
+
class ExecutableCode
|
155
|
+
include ::Google::Protobuf::MessageExts
|
156
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
157
|
+
end
|
158
|
+
|
159
|
+
# Result of executing ExecutableCode.
|
160
|
+
# @!attribute [rw] outcome
|
161
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent::CodeExecutionResult::Outcome]
|
162
|
+
# Required. Outcome of the code execution.
|
163
|
+
# @!attribute [rw] output
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. Contains stdout when code execution is successful, stderr or
|
166
|
+
# other description otherwise.
|
167
|
+
class CodeExecutionResult
|
168
|
+
include ::Google::Protobuf::MessageExts
|
169
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
170
|
+
|
171
|
+
# Enumeration of possible outcomes of the code execution.
|
172
|
+
module Outcome
|
173
|
+
# Unspecified status. This value should not be used.
|
174
|
+
OUTCOME_UNSPECIFIED = 0
|
175
|
+
|
176
|
+
# Code execution completed successfully.
|
177
|
+
OUTCOME_OK = 1
|
178
|
+
|
179
|
+
# Code execution finished but with a failure. `stderr` should contain the
|
180
|
+
# reason.
|
181
|
+
OUTCOME_FAILED = 2
|
182
|
+
|
183
|
+
# Code execution ran for too long, and was cancelled. There may or may
|
184
|
+
# not be a partial output present.
|
185
|
+
OUTCOME_DEADLINE_EXCEEDED = 3
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# A piece of content and possibly its grounding information.
|
191
|
+
#
|
192
|
+
# Not all content needs grounding. Phrases like "Of course, I will gladly
|
193
|
+
# search it for you." do not need grounding.
|
194
|
+
# @!attribute [rw] text_grounding_metadata
|
195
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata]
|
196
|
+
# Metadata for grounding based on text sources.
|
197
|
+
# @!attribute [rw] content
|
198
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantContent]
|
199
|
+
# The content.
|
200
|
+
class AssistantGroundedContent
|
201
|
+
include ::Google::Protobuf::MessageExts
|
202
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
|
204
|
+
# Grounding details for text sources.
|
205
|
+
# @!attribute [rw] segments
|
206
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Segment>]
|
207
|
+
# Grounding information for parts of the text.
|
208
|
+
# @!attribute [rw] references
|
209
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Reference>]
|
210
|
+
# References for the grounded text.
|
211
|
+
class TextGroundingMetadata
|
212
|
+
include ::Google::Protobuf::MessageExts
|
213
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
214
|
+
|
215
|
+
# Grounding information for a segment of the text.
|
216
|
+
# @!attribute [rw] start_index
|
217
|
+
# @return [::Integer]
|
218
|
+
# Zero-based index indicating the start of the segment, measured in bytes
|
219
|
+
# of a UTF-8 string (i.e. characters encoded on multiple bytes have a
|
220
|
+
# length of more than one).
|
221
|
+
# @!attribute [rw] end_index
|
222
|
+
# @return [::Integer]
|
223
|
+
# End of the segment, exclusive.
|
224
|
+
# @!attribute [rw] reference_indices
|
225
|
+
# @return [::Array<::Integer>]
|
226
|
+
# References for the segment.
|
227
|
+
# @!attribute [rw] grounding_score
|
228
|
+
# @return [::Float]
|
229
|
+
# Score for the segment.
|
230
|
+
# @!attribute [rw] text
|
231
|
+
# @return [::String]
|
232
|
+
# The text segment itself.
|
233
|
+
class Segment
|
234
|
+
include ::Google::Protobuf::MessageExts
|
235
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
236
|
+
end
|
237
|
+
|
238
|
+
# Referenced content and related document metadata.
|
239
|
+
# @!attribute [rw] content
|
240
|
+
# @return [::String]
|
241
|
+
# Referenced text content.
|
242
|
+
# @!attribute [rw] document_metadata
|
243
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata]
|
244
|
+
# Document metadata.
|
245
|
+
class Reference
|
246
|
+
include ::Google::Protobuf::MessageExts
|
247
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
248
|
+
|
249
|
+
# Document metadata.
|
250
|
+
# @!attribute [rw] document
|
251
|
+
# @return [::String]
|
252
|
+
# Document resource name.
|
253
|
+
# @!attribute [rw] uri
|
254
|
+
# @return [::String]
|
255
|
+
# URI for the document. It may contain a URL that redirects to the
|
256
|
+
# actual website.
|
257
|
+
# @!attribute [rw] title
|
258
|
+
# @return [::String]
|
259
|
+
# Title.
|
260
|
+
# @!attribute [rw] page_identifier
|
261
|
+
# @return [::String]
|
262
|
+
# Page identifier.
|
263
|
+
# @!attribute [rw] domain
|
264
|
+
# @return [::String]
|
265
|
+
# Domain name from the document URI. Note that the `uri` field may
|
266
|
+
# contain a URL that redirects to the actual website, in which case
|
267
|
+
# this will contain the domain name of the target site.
|
268
|
+
class DocumentMetadata
|
269
|
+
include ::Google::Protobuf::MessageExts
|
270
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Discovery Engine Assistant resource.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Immutable. Resource name of the assistant.
|
28
|
+
# Format:
|
29
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
|
30
|
+
#
|
31
|
+
# It must be a UTF-8 encoded string with a length limit of 1024 characters.
|
32
|
+
class Assistant
|
33
|
+
include ::Google::Protobuf::MessageExts
|
34
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# User metadata of the request.
|
25
|
+
# @!attribute [rw] time_zone
|
26
|
+
# @return [::String]
|
27
|
+
# Optional. IANA time zone, e.g. Europe/Budapest.
|
28
|
+
# @!attribute [rw] preferred_language_code
|
29
|
+
# @return [::String]
|
30
|
+
# Optional. Preferred language to be used for answering if language detection
|
31
|
+
# fails. Also used as the language of error messages created by actions,
|
32
|
+
# regardless of language detection results.
|
33
|
+
class AssistUserMetadata
|
34
|
+
include ::Google::Protobuf::MessageExts
|
35
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
36
|
+
end
|
37
|
+
|
38
|
+
# Request for the
|
39
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist AssistantService.StreamAssist}
|
40
|
+
# method.
|
41
|
+
# @!attribute [rw] name
|
42
|
+
# @return [::String]
|
43
|
+
# Required. The resource name of the
|
44
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Assistant Assistant}. Format:
|
45
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
|
46
|
+
# @!attribute [rw] query
|
47
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Query]
|
48
|
+
# Optional. Current user query.
|
49
|
+
#
|
50
|
+
# Empty query is only supported if `file_ids` are provided. In this case, the
|
51
|
+
# answer will be generated based on those context files.
|
52
|
+
# @!attribute [rw] session
|
53
|
+
# @return [::String]
|
54
|
+
# Optional. The session to use for the request. If specified, the assistant
|
55
|
+
# has access to the session history, and the query and the answer are stored
|
56
|
+
# there.
|
57
|
+
#
|
58
|
+
# If `-` is specified as the session ID, or it is left empty, then a new
|
59
|
+
# session is created with an automatically generated ID.
|
60
|
+
#
|
61
|
+
# Format:
|
62
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
|
63
|
+
# @!attribute [rw] user_metadata
|
64
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistUserMetadata]
|
65
|
+
# Optional. Information about the user initiating the query.
|
66
|
+
# @!attribute [rw] tools_spec
|
67
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec]
|
68
|
+
# Optional. Specification of tools that are used to serve the request.
|
69
|
+
# @!attribute [rw] generation_spec
|
70
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::GenerationSpec]
|
71
|
+
# Optional. Specification of the generation configuration for the request.
|
72
|
+
class StreamAssistRequest
|
73
|
+
include ::Google::Protobuf::MessageExts
|
74
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
75
|
+
|
76
|
+
# Specification of tools that are used to serve the request.
|
77
|
+
# @!attribute [rw] vertex_ai_search_spec
|
78
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::VertexAiSearchSpec]
|
79
|
+
# Optional. Specification of the Vertex AI Search tool.
|
80
|
+
# @!attribute [rw] web_grounding_spec
|
81
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::WebGroundingSpec]
|
82
|
+
# Optional. Specification of the web grounding tool.
|
83
|
+
# If field is present, enables grounding with web search. Works only if
|
84
|
+
# [Assistant.web_grounding_type][google.cloud.discoveryengine.v1.Assistant.web_grounding_type]
|
85
|
+
# is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or
|
86
|
+
# [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][].
|
87
|
+
# @!attribute [rw] image_generation_spec
|
88
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::ImageGenerationSpec]
|
89
|
+
# Optional. Specification of the image generation tool.
|
90
|
+
# @!attribute [rw] video_generation_spec
|
91
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistRequest::ToolsSpec::VideoGenerationSpec]
|
92
|
+
# Optional. Specification of the video generation tool.
|
93
|
+
class ToolsSpec
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
|
97
|
+
# Specification of the Vertex AI Search tool.
|
98
|
+
# @!attribute [rw] data_store_specs
|
99
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
|
100
|
+
# Optional. Specs defining
|
101
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}s to filter on in
|
102
|
+
# a search call and configurations for those data stores. This is only
|
103
|
+
# considered for {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}s with
|
104
|
+
# multiple data stores.
|
105
|
+
# @!attribute [rw] filter
|
106
|
+
# @return [::String]
|
107
|
+
# Optional. The filter syntax consists of an expression language for
|
108
|
+
# constructing a predicate from one or more fields of the documents being
|
109
|
+
# filtered. Filter expression is case-sensitive.
|
110
|
+
#
|
111
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
112
|
+
#
|
113
|
+
# Filtering in Vertex AI Search is done by mapping the LHS filter key to
|
114
|
+
# a key property defined in the Vertex AI Search backend -- this mapping
|
115
|
+
# is defined by the customer in their schema. For example a media
|
116
|
+
# customer might have a field 'name' in their schema. In this case the
|
117
|
+
# filter would look like this: filter --> name:'ANY("king kong")'
|
118
|
+
#
|
119
|
+
# For more information about filtering including syntax and filter
|
120
|
+
# operators, see
|
121
|
+
# [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
122
|
+
class VertexAiSearchSpec
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
|
127
|
+
# Specification of the web grounding tool.
|
128
|
+
class WebGroundingSpec
|
129
|
+
include ::Google::Protobuf::MessageExts
|
130
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
131
|
+
end
|
132
|
+
|
133
|
+
# Specification of the image generation tool.
|
134
|
+
class ImageGenerationSpec
|
135
|
+
include ::Google::Protobuf::MessageExts
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
|
+
end
|
138
|
+
|
139
|
+
# Specification of the video generation tool.
|
140
|
+
class VideoGenerationSpec
|
141
|
+
include ::Google::Protobuf::MessageExts
|
142
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Assistant generation specification for the request.
|
147
|
+
# This allows to override the default generation configuration at the engine
|
148
|
+
# level.
|
149
|
+
# @!attribute [rw] model_id
|
150
|
+
# @return [::String]
|
151
|
+
# Optional. The Vertex AI model_id used for the generative model. If not
|
152
|
+
# set, the default Assistant model will be used.
|
153
|
+
class GenerationSpec
|
154
|
+
include ::Google::Protobuf::MessageExts
|
155
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Response for the
|
160
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AssistantService::Client#stream_assist AssistantService.StreamAssist}
|
161
|
+
# method.
|
162
|
+
# @!attribute [rw] answer
|
163
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AssistAnswer]
|
164
|
+
# Assist answer resource object containing parts of the assistant's final
|
165
|
+
# answer for the user's query.
|
166
|
+
#
|
167
|
+
# Not present if the current response doesn't add anything to previously
|
168
|
+
# sent
|
169
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#replies AssistAnswer.replies}.
|
170
|
+
#
|
171
|
+
# Observe
|
172
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#state AssistAnswer.state} to
|
173
|
+
# see if more parts are to be expected. While the state is `IN_PROGRESS`, the
|
174
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AssistAnswer#replies AssistAnswer.replies}
|
175
|
+
# field in each response will contain replies (reply fragments) to be
|
176
|
+
# appended to the ones received in previous responses. [AssistAnswer.name][]
|
177
|
+
# won't be filled.
|
178
|
+
#
|
179
|
+
# If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
|
180
|
+
# is the last response and [AssistAnswer.name][] will have a value.
|
181
|
+
# @!attribute [rw] session_info
|
182
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::StreamAssistResponse::SessionInfo]
|
183
|
+
# Session information.
|
184
|
+
# @!attribute [rw] assist_token
|
185
|
+
# @return [::String]
|
186
|
+
# A global unique ID that identifies the current pair of request and stream
|
187
|
+
# of responses. Used for feedback and support.
|
188
|
+
class StreamAssistResponse
|
189
|
+
include ::Google::Protobuf::MessageExts
|
190
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
191
|
+
|
192
|
+
# Information about the session.
|
193
|
+
# @!attribute [rw] session
|
194
|
+
# @return [::String]
|
195
|
+
# Name of the newly generated or continued session.
|
196
|
+
#
|
197
|
+
# Format:
|
198
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
|
199
|
+
class SessionInfo
|
200
|
+
include ::Google::Protobuf::MessageExts
|
201
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
@@ -926,11 +926,23 @@ module Google
|
|
926
926
|
# Provide this to retrieve the subsequent page.
|
927
927
|
# @!attribute [rw] filter
|
928
928
|
# @return [::String]
|
929
|
-
# A
|
930
|
-
#
|
929
|
+
# A comma-separated list of fields to filter by, in EBNF grammar.
|
930
|
+
# The supported fields are:
|
931
|
+
# * `user_pseudo_id`
|
932
|
+
# * `state`
|
933
|
+
# * `display_name`
|
934
|
+
# * `starred`
|
935
|
+
# * `is_pinned`
|
936
|
+
# * `labels`
|
937
|
+
# * `create_time`
|
938
|
+
# * `update_time`
|
931
939
|
#
|
932
|
-
#
|
940
|
+
# Examples:
|
933
941
|
# "user_pseudo_id = some_id"
|
942
|
+
# "display_name = \"some_name\""
|
943
|
+
# "starred = true"
|
944
|
+
# "is_pinned=true AND (NOT labels:hidden)"
|
945
|
+
# "create_time > \"1970-01-01T12:00:00Z\""
|
934
946
|
# @!attribute [rw] order_by
|
935
947
|
# @return [::String]
|
936
948
|
# A comma-separated list of fields to order by, sorted in ascending order.
|