google-cloud-discovery_engine-v1 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +228 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +214 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +911 -135
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +733 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +26 -14
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +26 -14
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +57 -9
- data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +68 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +57 -9
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +15 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +9 -1
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +375 -0
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +119 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +31 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +529 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +143 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +118 -4
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +42 -0
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
- data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +230 -20
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
- metadata +58 -2
@@ -0,0 +1,143 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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
|
+
# A singleton resource of
|
25
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}. It's empty when
|
26
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} is created, which
|
27
|
+
# defaults to digital parser. The first call to
|
28
|
+
# [DataStoreService.UpdateDocumentProcessingConfig][] method will initialize
|
29
|
+
# the config.
|
30
|
+
# @!attribute [rw] name
|
31
|
+
# @return [::String]
|
32
|
+
# The full resource name of the Document Processing Config.
|
33
|
+
# Format:
|
34
|
+
# `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.
|
35
|
+
# @!attribute [rw] chunking_config
|
36
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ChunkingConfig]
|
37
|
+
# Whether chunking mode is enabled.
|
38
|
+
# @!attribute [rw] default_parsing_config
|
39
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig]
|
40
|
+
# Configurations for default Document parser.
|
41
|
+
# If not specified, we will configure it as default DigitalParsingConfig, and
|
42
|
+
# the default parsing config will be applied to all file types for Document
|
43
|
+
# parsing.
|
44
|
+
# @!attribute [rw] parsing_config_overrides
|
45
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig}]
|
46
|
+
# Map from file type to override the default parsing configuration based on
|
47
|
+
# the file type. Supported keys:
|
48
|
+
#
|
49
|
+
# * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
|
50
|
+
# parsing or layout parsing is supported.
|
51
|
+
# * `html`: Override parsing config for HTML files, only digital parsing and
|
52
|
+
# layout parsing are supported.
|
53
|
+
# * `docx`: Override parsing config for DOCX files, only digital parsing and
|
54
|
+
# layout parsing are supported.
|
55
|
+
# * `pptx`: Override parsing config for PPTX files, only digital parsing and
|
56
|
+
# layout parsing are supported.
|
57
|
+
class DocumentProcessingConfig
|
58
|
+
include ::Google::Protobuf::MessageExts
|
59
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
60
|
+
|
61
|
+
# Configuration for chunking config.
|
62
|
+
# @!attribute [rw] layout_based_chunking_config
|
63
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ChunkingConfig::LayoutBasedChunkingConfig]
|
64
|
+
# Configuration for the layout based chunking.
|
65
|
+
class ChunkingConfig
|
66
|
+
include ::Google::Protobuf::MessageExts
|
67
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
68
|
+
|
69
|
+
# Configuration for the layout based chunking.
|
70
|
+
# @!attribute [rw] chunk_size
|
71
|
+
# @return [::Integer]
|
72
|
+
# The token size limit for each chunk.
|
73
|
+
#
|
74
|
+
# Supported values: 100-500 (inclusive).
|
75
|
+
# Default value: 500.
|
76
|
+
# @!attribute [rw] include_ancestor_headings
|
77
|
+
# @return [::Boolean]
|
78
|
+
# Whether to include appending different levels of headings to chunks
|
79
|
+
# from the middle of the document to prevent context loss.
|
80
|
+
#
|
81
|
+
# Default value: False.
|
82
|
+
class LayoutBasedChunkingConfig
|
83
|
+
include ::Google::Protobuf::MessageExts
|
84
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Related configurations applied to a specific type of document parser.
|
89
|
+
# @!attribute [rw] digital_parsing_config
|
90
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig::DigitalParsingConfig]
|
91
|
+
# Configurations applied to digital parser.
|
92
|
+
# @!attribute [rw] ocr_parsing_config
|
93
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig::OcrParsingConfig]
|
94
|
+
# Configurations applied to OCR parser. Currently it only applies to
|
95
|
+
# PDFs.
|
96
|
+
# @!attribute [rw] layout_parsing_config
|
97
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig::LayoutParsingConfig]
|
98
|
+
# Configurations applied to layout parser.
|
99
|
+
class ParsingConfig
|
100
|
+
include ::Google::Protobuf::MessageExts
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
102
|
+
|
103
|
+
# The digital parsing configurations for documents.
|
104
|
+
class DigitalParsingConfig
|
105
|
+
include ::Google::Protobuf::MessageExts
|
106
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
107
|
+
end
|
108
|
+
|
109
|
+
# The OCR parsing configurations for documents.
|
110
|
+
# @!attribute [rw] enhanced_document_elements
|
111
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
112
|
+
# @return [::Array<::String>]
|
113
|
+
# [DEPRECATED] This field is deprecated. To use the additional enhanced
|
114
|
+
# document elements processing, please switch to `layout_parsing_config`.
|
115
|
+
# @!attribute [rw] use_native_text
|
116
|
+
# @return [::Boolean]
|
117
|
+
# If true, will use native text instead of OCR text on pages containing
|
118
|
+
# native text.
|
119
|
+
class OcrParsingConfig
|
120
|
+
include ::Google::Protobuf::MessageExts
|
121
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
end
|
123
|
+
|
124
|
+
# The layout parsing configurations for documents.
|
125
|
+
class LayoutParsingConfig
|
126
|
+
include ::Google::Protobuf::MessageExts
|
127
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# @!attribute [rw] key
|
132
|
+
# @return [::String]
|
133
|
+
# @!attribute [rw] value
|
134
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig::ParsingConfig]
|
135
|
+
class ParsingConfigOverridesEntry
|
136
|
+
include ::Google::Protobuf::MessageExts
|
137
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
# @return [::Integer]
|
60
60
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
|
61
61
|
# return. If unspecified, defaults to 100. The maximum allowed value is 1000.
|
62
|
-
# Values above 1000
|
62
|
+
# Values above 1000 are set to 1000.
|
63
63
|
#
|
64
64
|
# If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
65
65
|
# @!attribute [rw] page_token
|
@@ -110,7 +110,7 @@ module Google
|
|
110
110
|
# @!attribute [rw] document_id
|
111
111
|
# @return [::String]
|
112
112
|
# Required. The ID to use for the
|
113
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which
|
113
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which becomes the
|
114
114
|
# final component of the
|
115
115
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name}.
|
116
116
|
#
|
@@ -148,13 +148,13 @@ module Google
|
|
148
148
|
# is not set, a `NOT_FOUND` error is returned.
|
149
149
|
# @!attribute [rw] allow_missing
|
150
150
|
# @return [::Boolean]
|
151
|
-
# If set to true
|
151
|
+
# If set to `true` and the
|
152
152
|
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not found, a new
|
153
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}
|
153
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} is be created.
|
154
154
|
# @!attribute [rw] update_mask
|
155
155
|
# @return [::Google::Protobuf::FieldMask]
|
156
156
|
# Indicates which fields in the provided imported 'document' to update. If
|
157
|
-
# not set,
|
157
|
+
# not set, by default updates all fields.
|
158
158
|
class UpdateDocumentRequest
|
159
159
|
include ::Google::Protobuf::MessageExts
|
160
160
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -89,7 +89,7 @@ module Google
|
|
89
89
|
# The restriction of the Engine industry vertical is based on
|
90
90
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}: If unspecified,
|
91
91
|
# default to `GENERIC`. Vertical on Engine has to match vertical of the
|
92
|
-
# DataStore
|
92
|
+
# DataStore linked to the engine.
|
93
93
|
# @!attribute [rw] common_config
|
94
94
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Engine::CommonConfig]
|
95
95
|
# Common config spec that specifies the metadata of the engine.
|
@@ -187,8 +187,8 @@ module Google
|
|
187
187
|
# Common configurations for an Engine.
|
188
188
|
# @!attribute [rw] company_name
|
189
189
|
# @return [::String]
|
190
|
-
#
|
191
|
-
#
|
190
|
+
# The name of the company, business or entity that is associated with the
|
191
|
+
# engine. Setting this may help improve LLM related features.
|
192
192
|
class CommonConfig
|
193
193
|
include ::Google::Protobuf::MessageExts
|
194
194
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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
|
+
# Specification for the grounding check.
|
25
|
+
# @!attribute [rw] citation_threshold
|
26
|
+
# @return [::Float]
|
27
|
+
# The threshold (in [0,1]) used for determining whether a fact must be
|
28
|
+
# cited for a claim in the answer candidate. Choosing a higher threshold
|
29
|
+
# will lead to fewer but very strong citations, while choosing a lower
|
30
|
+
# threshold may lead to more but somewhat weaker citations. If unset, the
|
31
|
+
# threshold will default to 0.6.
|
32
|
+
class CheckGroundingSpec
|
33
|
+
include ::Google::Protobuf::MessageExts
|
34
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
# Request message for
|
38
|
+
# {::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
|
39
|
+
# method.
|
40
|
+
# @!attribute [rw] grounding_config
|
41
|
+
# @return [::String]
|
42
|
+
# Required. The resource name of the grounding config, such as
|
43
|
+
# `projects/*/locations/global/groundingConfigs/default_grounding_config`.
|
44
|
+
# @!attribute [rw] answer_candidate
|
45
|
+
# @return [::String]
|
46
|
+
# Answer candidate to check. Can have a maximum length of 1024 characters.
|
47
|
+
# @!attribute [rw] facts
|
48
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>]
|
49
|
+
# List of facts for the grounding check.
|
50
|
+
# We support up to 200 facts.
|
51
|
+
# @!attribute [rw] grounding_spec
|
52
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::CheckGroundingSpec]
|
53
|
+
# Configuration of the grounding check.
|
54
|
+
# @!attribute [rw] user_labels
|
55
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
56
|
+
# The user labels applied to a resource must meet the following requirements:
|
57
|
+
#
|
58
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
59
|
+
# * Each label must be a key-value pair.
|
60
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
61
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
62
|
+
# length of 63 characters.
|
63
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
64
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
65
|
+
# international characters are allowed.
|
66
|
+
# * The key portion of a label must be unique. However, you can use the same
|
67
|
+
# key with multiple resources.
|
68
|
+
# * Keys must start with a lowercase letter or international character.
|
69
|
+
#
|
70
|
+
# See [Google Cloud
|
71
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
72
|
+
# for more details.
|
73
|
+
class CheckGroundingRequest
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
|
77
|
+
# @!attribute [rw] key
|
78
|
+
# @return [::String]
|
79
|
+
# @!attribute [rw] value
|
80
|
+
# @return [::String]
|
81
|
+
class UserLabelsEntry
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Response message for the
|
88
|
+
# {::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
|
89
|
+
# method.
|
90
|
+
# @!attribute [rw] support_score
|
91
|
+
# @return [::Float]
|
92
|
+
# The support score for the input answer candidate.
|
93
|
+
# Higher the score, higher is the fraction of claims that are supported by
|
94
|
+
# the provided facts. This is always set when a response is returned.
|
95
|
+
# @!attribute [rw] cited_chunks
|
96
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::FactChunk>]
|
97
|
+
# List of facts cited across all claims in the answer candidate.
|
98
|
+
# These are derived from the facts supplied in the request.
|
99
|
+
# @!attribute [rw] claims
|
100
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim>]
|
101
|
+
# Claim texts and citation info across all claims in the answer candidate.
|
102
|
+
class CheckGroundingResponse
|
103
|
+
include ::Google::Protobuf::MessageExts
|
104
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
105
|
+
|
106
|
+
# Text and citation info for a claim in the answer candidate.
|
107
|
+
# @!attribute [rw] start_pos
|
108
|
+
# @return [::Integer]
|
109
|
+
# Position indicating the start of the claim in the answer candidate,
|
110
|
+
# measured in bytes.
|
111
|
+
# @!attribute [rw] end_pos
|
112
|
+
# @return [::Integer]
|
113
|
+
# Position indicating the end of the claim in the answer candidate,
|
114
|
+
# exclusive.
|
115
|
+
# @!attribute [rw] claim_text
|
116
|
+
# @return [::String]
|
117
|
+
# Text for the claim in the answer candidate. Always provided regardless of
|
118
|
+
# whether citations or anti-citations are found.
|
119
|
+
# @!attribute [rw] citation_indices
|
120
|
+
# @return [::Array<::Integer>]
|
121
|
+
# A list of indices (into 'cited_chunks') specifying the citations
|
122
|
+
# associated with the claim. For instance [1,3,4] means that
|
123
|
+
# cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
|
124
|
+
# supporting for the claim. A citation to a fact indicates that the claim
|
125
|
+
# is supported by the fact.
|
126
|
+
# @!attribute [rw] grounding_check_required
|
127
|
+
# @return [::Boolean]
|
128
|
+
# Indicates that this claim required grounding check. When the system
|
129
|
+
# decided this claim doesn't require attribution/grounding check, this
|
130
|
+
# field will be set to false. In that case, no grounding check was done for
|
131
|
+
# the claim and therefore
|
132
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices},
|
133
|
+
# and
|
134
|
+
# [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices]
|
135
|
+
# should not be returned.
|
136
|
+
class Claim
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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
|
+
# Grounding Fact.
|
25
|
+
# @!attribute [rw] fact_text
|
26
|
+
# @return [::String]
|
27
|
+
# Text content of the fact. Can be at most 10K characters long.
|
28
|
+
# @!attribute [rw] attributes
|
29
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
30
|
+
# Attributes associated with the fact.
|
31
|
+
# Common attributes include `source` (indicating where the fact was sourced
|
32
|
+
# from), `author` (indicating the author of the fact), and so on.
|
33
|
+
class GroundingFact
|
34
|
+
include ::Google::Protobuf::MessageExts
|
35
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
36
|
+
|
37
|
+
# @!attribute [rw] key
|
38
|
+
# @return [::String]
|
39
|
+
# @!attribute [rw] value
|
40
|
+
# @return [::String]
|
41
|
+
class AttributesEntry
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Fact Chunk.
|
48
|
+
# @!attribute [rw] chunk_text
|
49
|
+
# @return [::String]
|
50
|
+
# Text content of the fact chunk. Can be at most 10K characters long.
|
51
|
+
# @!attribute [rw] source
|
52
|
+
# @return [::String]
|
53
|
+
# Source from which this fact chunk was retrieved. If it was retrieved
|
54
|
+
# from the GroundingFacts provided in the request then this field will
|
55
|
+
# contain the index of the specific fact from which this chunk was
|
56
|
+
# retrieved.
|
57
|
+
# @!attribute [rw] index
|
58
|
+
# @return [::Integer]
|
59
|
+
# The index of this chunk. Currently, only used for the streaming mode.
|
60
|
+
# @!attribute [rw] source_metadata
|
61
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
62
|
+
# More fine-grained information for the source reference.
|
63
|
+
class FactChunk
|
64
|
+
include ::Google::Protobuf::MessageExts
|
65
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
|
67
|
+
# @!attribute [rw] key
|
68
|
+
# @return [::String]
|
69
|
+
# @!attribute [rw] value
|
70
|
+
# @return [::String]
|
71
|
+
class SourceMetadataEntry
|
72
|
+
include ::Google::Protobuf::MessageExts
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
# Cloud Storage location for input content.
|
25
25
|
# @!attribute [rw] input_uris
|
26
26
|
# @return [::Array<::String>]
|
27
|
-
# Required. Cloud Storage URIs to input files. URI can be up to
|
27
|
+
# Required. Cloud Storage URIs to input files. Each URI can be up to
|
28
28
|
# 2000 characters long. URIs can match the full object path (for example,
|
29
29
|
# `gs://bucket/directory/object.json`) or a pattern matching one or more
|
30
30
|
# files, such as `gs://bucket/directory/*.json`.
|
@@ -53,7 +53,7 @@ module Google
|
|
53
53
|
# data store. Each entry after the header is imported as a Document.
|
54
54
|
# This can only be used by the GENERIC Data Store vertical.
|
55
55
|
#
|
56
|
-
# Supported values for user
|
56
|
+
# Supported values for user event imports:
|
57
57
|
#
|
58
58
|
# * `user_event` (default): One JSON
|
59
59
|
# {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} per line.
|
@@ -338,6 +338,41 @@ module Google
|
|
338
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
339
339
|
end
|
340
340
|
|
341
|
+
# AlloyDB source import data from.
|
342
|
+
# @!attribute [rw] project_id
|
343
|
+
# @return [::String]
|
344
|
+
# The project ID that the AlloyDB source is in
|
345
|
+
# with a length limit of 128 characters. If not specified, inherits the
|
346
|
+
# project ID from the parent request.
|
347
|
+
# @!attribute [rw] location_id
|
348
|
+
# @return [::String]
|
349
|
+
# Required. The AlloyDB location to copy the data from with a length limit of
|
350
|
+
# 256 characters.
|
351
|
+
# @!attribute [rw] cluster_id
|
352
|
+
# @return [::String]
|
353
|
+
# Required. The AlloyDB cluster to copy the data from with a length limit of
|
354
|
+
# 256 characters.
|
355
|
+
# @!attribute [rw] database_id
|
356
|
+
# @return [::String]
|
357
|
+
# Required. The AlloyDB database to copy the data from with a length limit of
|
358
|
+
# 256 characters.
|
359
|
+
# @!attribute [rw] table_id
|
360
|
+
# @return [::String]
|
361
|
+
# Required. The AlloyDB table to copy the data from with a length limit of
|
362
|
+
# 256 characters.
|
363
|
+
# @!attribute [rw] gcs_staging_dir
|
364
|
+
# @return [::String]
|
365
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
366
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
367
|
+
# AlloyDB export to a specific Cloud Storage directory.
|
368
|
+
#
|
369
|
+
# Ensure that the AlloyDB service account has the necessary Cloud
|
370
|
+
# Storage Admin permissions to access the specified Cloud Storage directory.
|
371
|
+
class AlloyDbSource
|
372
|
+
include ::Google::Protobuf::MessageExts
|
373
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
374
|
+
end
|
375
|
+
|
341
376
|
# Firestore source import data from.
|
342
377
|
# @!attribute [rw] project_id
|
343
378
|
# @return [::String]
|
@@ -350,8 +385,8 @@ module Google
|
|
350
385
|
# of 256 characters.
|
351
386
|
# @!attribute [rw] collection_id
|
352
387
|
# @return [::String]
|
353
|
-
# Required. The Firestore collection to copy the data from with a
|
354
|
-
# limit of 1,500 characters.
|
388
|
+
# Required. The Firestore collection (or entity) to copy the data from with a
|
389
|
+
# length limit of 1,500 characters.
|
355
390
|
# @!attribute [rw] gcs_staging_dir
|
356
391
|
# @return [::String]
|
357
392
|
# Intermediate Cloud Storage directory used for the import with a length
|
@@ -496,6 +531,9 @@ module Google
|
|
496
531
|
# @!attribute [rw] firestore_source
|
497
532
|
# @return [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource]
|
498
533
|
# Firestore input source.
|
534
|
+
# @!attribute [rw] alloy_db_source
|
535
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AlloyDbSource]
|
536
|
+
# AlloyDB input source.
|
499
537
|
# @!attribute [rw] bigtable_source
|
500
538
|
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableSource]
|
501
539
|
# Cloud Bigtable input source.
|
@@ -689,6 +727,82 @@ module Google
|
|
689
727
|
include ::Google::Protobuf::MessageExts
|
690
728
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
691
729
|
end
|
730
|
+
|
731
|
+
# Request message for
|
732
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#import_completion_suggestions CompletionService.ImportCompletionSuggestions}
|
733
|
+
# method.
|
734
|
+
# @!attribute [rw] inline_source
|
735
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportCompletionSuggestionsRequest::InlineSource]
|
736
|
+
# The Inline source for suggestion entries.
|
737
|
+
# @!attribute [rw] gcs_source
|
738
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GcsSource]
|
739
|
+
# Cloud Storage location for the input content.
|
740
|
+
# @!attribute [rw] bigquery_source
|
741
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource]
|
742
|
+
# BigQuery input source.
|
743
|
+
# @!attribute [rw] parent
|
744
|
+
# @return [::String]
|
745
|
+
# Required. The parent data store resource name for which to import customer
|
746
|
+
# autocomplete suggestions.
|
747
|
+
#
|
748
|
+
# Follows pattern `projects/*/locations/*/collections/*/dataStores/*`
|
749
|
+
# @!attribute [rw] error_config
|
750
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
|
751
|
+
# The desired location of errors incurred during the Import.
|
752
|
+
class ImportCompletionSuggestionsRequest
|
753
|
+
include ::Google::Protobuf::MessageExts
|
754
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
755
|
+
|
756
|
+
# The inline source for CompletionSuggestions.
|
757
|
+
# @!attribute [rw] suggestions
|
758
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion>]
|
759
|
+
# Required. A list of all denylist entries to import. Max of 1000 items.
|
760
|
+
class InlineSource
|
761
|
+
include ::Google::Protobuf::MessageExts
|
762
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
# Response of the
|
767
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#import_completion_suggestions CompletionService.ImportCompletionSuggestions}
|
768
|
+
# method. If the long running operation is done, this message is returned by
|
769
|
+
# the google.longrunning.Operations.response field if the operation is
|
770
|
+
# successful.
|
771
|
+
# @!attribute [rw] error_samples
|
772
|
+
# @return [::Array<::Google::Rpc::Status>]
|
773
|
+
# A sample of errors encountered while processing the request.
|
774
|
+
# @!attribute [rw] error_config
|
775
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
|
776
|
+
# The desired location of errors incurred during the Import.
|
777
|
+
class ImportCompletionSuggestionsResponse
|
778
|
+
include ::Google::Protobuf::MessageExts
|
779
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
780
|
+
end
|
781
|
+
|
782
|
+
# Metadata related to the progress of the ImportCompletionSuggestions
|
783
|
+
# operation. This will be returned by the google.longrunning.Operation.metadata
|
784
|
+
# field.
|
785
|
+
# @!attribute [rw] create_time
|
786
|
+
# @return [::Google::Protobuf::Timestamp]
|
787
|
+
# Operation create time.
|
788
|
+
# @!attribute [rw] update_time
|
789
|
+
# @return [::Google::Protobuf::Timestamp]
|
790
|
+
# Operation last update time. If the operation is done, this is also the
|
791
|
+
# finish time.
|
792
|
+
# @!attribute [rw] success_count
|
793
|
+
# @return [::Integer]
|
794
|
+
# Count of
|
795
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion CompletionSuggestion}s
|
796
|
+
# successfully imported.
|
797
|
+
# @!attribute [rw] failure_count
|
798
|
+
# @return [::Integer]
|
799
|
+
# Count of
|
800
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion CompletionSuggestion}s
|
801
|
+
# that failed to be imported.
|
802
|
+
class ImportCompletionSuggestionsMetadata
|
803
|
+
include ::Google::Protobuf::MessageExts
|
804
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
805
|
+
end
|
692
806
|
end
|
693
807
|
end
|
694
808
|
end
|