@google-cloud/discoveryengine 1.7.0 → 1.9.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.
Files changed (229) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +33 -4
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +337 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/common.proto +34 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/completion.proto +1 -1
  6. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +1 -1
  7. package/build/protos/google/cloud/discoveryengine/v1/control.proto +214 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/control_service.proto +236 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -3
  10. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +570 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +5 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +3 -3
  13. package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +92 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +7 -7
  16. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +5 -5
  17. package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +1 -1
  18. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +149 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +58 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +5 -5
  21. package/build/protos/google/cloud/discoveryengine/v1/project.proto +103 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/project_service.proto +90 -0
  23. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +1 -1
  24. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +131 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +21 -20
  26. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  27. package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +6 -6
  28. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +24 -19
  29. package/build/protos/google/cloud/discoveryengine/v1/session.proto +97 -0
  30. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +4 -1
  31. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +1 -1
  32. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +29 -4
  33. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +19 -3
  34. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +1 -1
  35. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +1 -1
  36. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +10 -1
  37. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +8 -1
  38. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +1 -1
  39. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +17 -1
  40. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +1 -1
  41. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +1 -1
  42. package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +217 -0
  43. package/build/protos/google/cloud/discoveryengine/v1alpha/control_service.proto +236 -0
  44. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -3
  45. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +20 -4
  46. package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +87 -0
  47. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +1 -1
  48. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +3 -3
  49. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  50. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +2 -1
  51. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +13 -10
  52. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +5 -5
  53. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +1 -1
  54. package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +1 -1
  55. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +31 -2
  56. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +4 -1
  57. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +5 -5
  58. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +2 -1
  59. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +3 -1
  60. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +1 -1
  61. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +20 -1
  62. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +21 -20
  63. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +38 -3
  64. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +7 -7
  65. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +29 -32
  66. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +40 -1
  67. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +1 -1
  68. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +1 -1
  69. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +4 -1
  70. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +4 -1
  71. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +1 -1
  72. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +30 -4
  73. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +19 -3
  74. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +11 -2
  75. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +17 -1
  76. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +1 -1
  77. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +1 -1
  78. package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +216 -0
  79. package/build/protos/google/cloud/discoveryengine/v1beta/control_service.proto +236 -0
  80. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -3
  81. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +20 -4
  82. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +87 -0
  83. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +1 -1
  84. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +3 -3
  85. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  86. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +2 -1
  87. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +8 -9
  88. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +5 -5
  89. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +1 -1
  90. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +31 -2
  91. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +4 -1
  92. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +5 -5
  93. package/build/protos/google/cloud/discoveryengine/v1beta/project.proto +103 -0
  94. package/build/protos/google/cloud/discoveryengine/v1beta/project_service.proto +90 -0
  95. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +1 -1
  96. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +20 -1
  97. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +21 -20
  98. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  99. package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +6 -6
  100. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +31 -25
  101. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +40 -1
  102. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +1 -1
  103. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +1 -1
  104. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +5 -2
  105. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +4 -1
  106. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +1 -1
  107. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +29 -4
  108. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +19 -3
  109. package/build/protos/protos.d.ts +52350 -38733
  110. package/build/protos/protos.js +136479 -103212
  111. package/build/protos/protos.json +9460 -5916
  112. package/build/src/index.d.ts +13 -1
  113. package/build/src/index.js +13 -1
  114. package/build/src/v1/completion_service_client.d.ts +549 -0
  115. package/build/src/v1/completion_service_client.js +771 -0
  116. package/build/src/v1/control_service_client.d.ts +1623 -0
  117. package/build/src/v1/control_service_client.js +2218 -0
  118. package/build/src/v1/control_service_client_config.json +63 -0
  119. package/build/src/v1/conversational_search_service_client.d.ts +893 -0
  120. package/build/src/v1/conversational_search_service_client.js +1040 -14
  121. package/build/src/v1/conversational_search_service_client_config.json +35 -0
  122. package/build/src/v1/data_store_service_client.d.ts +555 -6
  123. package/build/src/v1/data_store_service_client.js +775 -4
  124. package/build/src/v1/document_service_client.d.ts +557 -8
  125. package/build/src/v1/document_service_client.js +773 -2
  126. package/build/src/v1/engine_service_client.d.ts +549 -0
  127. package/build/src/v1/engine_service_client.js +771 -0
  128. package/build/src/v1/grounded_generation_service_client.d.ts +1439 -0
  129. package/build/src/v1/grounded_generation_service_client.js +2036 -0
  130. package/build/src/v1/grounded_generation_service_client_config.json +43 -0
  131. package/build/src/v1/index.d.ts +4 -0
  132. package/build/src/v1/index.js +9 -1
  133. package/build/src/v1/project_service_client.d.ts +1533 -0
  134. package/build/src/v1/project_service_client.js +2255 -0
  135. package/build/src/v1/project_service_client_config.json +43 -0
  136. package/build/src/v1/rank_service_client.d.ts +1449 -0
  137. package/build/src/v1/rank_service_client.js +2037 -0
  138. package/build/src/v1/rank_service_client_config.json +43 -0
  139. package/build/src/v1/recommendation_service_client.d.ts +568 -18
  140. package/build/src/v1/recommendation_service_client.js +756 -0
  141. package/build/src/v1/schema_service_client.d.ts +558 -9
  142. package/build/src/v1/schema_service_client.js +775 -4
  143. package/build/src/v1/search_service_client.d.ts +579 -21
  144. package/build/src/v1/search_service_client.js +776 -14
  145. package/build/src/v1/site_search_engine_service_client.d.ts +549 -0
  146. package/build/src/v1/site_search_engine_service_client.js +771 -0
  147. package/build/src/v1/user_event_service_client.d.ts +562 -2
  148. package/build/src/v1/user_event_service_client.js +771 -0
  149. package/build/src/v1alpha/acl_config_service_client.d.ts +237 -0
  150. package/build/src/v1alpha/acl_config_service_client.js +326 -0
  151. package/build/src/v1alpha/chunk_service_client.d.ts +237 -0
  152. package/build/src/v1alpha/chunk_service_client.js +326 -0
  153. package/build/src/v1alpha/completion_service_client.d.ts +237 -0
  154. package/build/src/v1alpha/completion_service_client.js +340 -0
  155. package/build/src/v1alpha/control_service_client.d.ts +2013 -0
  156. package/build/src/v1alpha/control_service_client.js +2757 -0
  157. package/build/src/v1alpha/control_service_client_config.json +63 -0
  158. package/build/src/v1alpha/conversational_search_service_client.d.ts +239 -2
  159. package/build/src/v1alpha/conversational_search_service_client.js +326 -0
  160. package/build/src/v1alpha/data_store_service_client.d.ts +243 -6
  161. package/build/src/v1alpha/data_store_service_client.js +344 -4
  162. package/build/src/v1alpha/document_service_client.d.ts +246 -9
  163. package/build/src/v1alpha/document_service_client.js +342 -2
  164. package/build/src/v1alpha/engine_service_client.d.ts +237 -0
  165. package/build/src/v1alpha/engine_service_client.js +340 -0
  166. package/build/src/v1alpha/estimate_billing_service_client.d.ts +237 -0
  167. package/build/src/v1alpha/estimate_billing_service_client.js +340 -0
  168. package/build/src/v1alpha/grounded_generation_service_client.d.ts +256 -1
  169. package/build/src/v1alpha/grounded_generation_service_client.js +326 -0
  170. package/build/src/v1alpha/index.d.ts +1 -0
  171. package/build/src/v1alpha/index.js +3 -1
  172. package/build/src/v1alpha/project_service_client.d.ts +239 -0
  173. package/build/src/v1alpha/project_service_client.js +340 -0
  174. package/build/src/v1alpha/project_service_client_config.json +21 -6
  175. package/build/src/v1alpha/rank_service_client.d.ts +255 -0
  176. package/build/src/v1alpha/rank_service_client.js +326 -0
  177. package/build/src/v1alpha/recommendation_service_client.d.ts +256 -18
  178. package/build/src/v1alpha/recommendation_service_client.js +326 -0
  179. package/build/src/v1alpha/schema_service_client.d.ts +247 -10
  180. package/build/src/v1alpha/schema_service_client.js +344 -4
  181. package/build/src/v1alpha/search_service_client.d.ts +267 -21
  182. package/build/src/v1alpha/search_service_client.js +346 -14
  183. package/build/src/v1alpha/search_tuning_service_client.d.ts +265 -0
  184. package/build/src/v1alpha/search_tuning_service_client.js +365 -1
  185. package/build/src/v1alpha/search_tuning_service_client_config.json +4 -0
  186. package/build/src/v1alpha/serving_config_service_client.d.ts +237 -0
  187. package/build/src/v1alpha/serving_config_service_client.js +326 -0
  188. package/build/src/v1alpha/site_search_engine_service_client.d.ts +237 -0
  189. package/build/src/v1alpha/site_search_engine_service_client.js +340 -0
  190. package/build/src/v1alpha/user_event_service_client.d.ts +250 -2
  191. package/build/src/v1alpha/user_event_service_client.js +340 -0
  192. package/build/src/v1beta/completion_service_client.d.ts +252 -0
  193. package/build/src/v1beta/completion_service_client.js +359 -0
  194. package/build/src/v1beta/control_service_client.d.ts +1860 -0
  195. package/build/src/v1beta/control_service_client.js +2545 -0
  196. package/build/src/v1beta/control_service_client_config.json +63 -0
  197. package/build/src/v1beta/conversational_search_service_client.d.ts +254 -2
  198. package/build/src/v1beta/conversational_search_service_client.js +348 -0
  199. package/build/src/v1beta/data_store_service_client.d.ts +258 -6
  200. package/build/src/v1beta/data_store_service_client.js +363 -4
  201. package/build/src/v1beta/document_service_client.d.ts +261 -10
  202. package/build/src/v1beta/document_service_client.js +361 -2
  203. package/build/src/v1beta/engine_service_client.d.ts +252 -0
  204. package/build/src/v1beta/engine_service_client.js +359 -0
  205. package/build/src/v1beta/grounded_generation_service_client.d.ts +271 -1
  206. package/build/src/v1beta/grounded_generation_service_client.js +348 -0
  207. package/build/src/v1beta/index.d.ts +2 -0
  208. package/build/src/v1beta/index.js +5 -1
  209. package/build/src/v1beta/project_service_client.d.ts +1770 -0
  210. package/build/src/v1beta/project_service_client.js +2576 -0
  211. package/build/src/v1beta/project_service_client_config.json +43 -0
  212. package/build/src/v1beta/rank_service_client.d.ts +270 -0
  213. package/build/src/v1beta/rank_service_client.js +348 -0
  214. package/build/src/v1beta/recommendation_service_client.d.ts +271 -18
  215. package/build/src/v1beta/recommendation_service_client.js +348 -0
  216. package/build/src/v1beta/schema_service_client.d.ts +261 -9
  217. package/build/src/v1beta/schema_service_client.js +363 -4
  218. package/build/src/v1beta/search_service_client.d.ts +282 -21
  219. package/build/src/v1beta/search_service_client.js +368 -14
  220. package/build/src/v1beta/search_tuning_service_client.d.ts +280 -0
  221. package/build/src/v1beta/search_tuning_service_client.js +384 -1
  222. package/build/src/v1beta/search_tuning_service_client_config.json +4 -0
  223. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  224. package/build/src/v1beta/serving_config_service_client.js +326 -0
  225. package/build/src/v1beta/site_search_engine_service_client.d.ts +252 -0
  226. package/build/src/v1beta/site_search_engine_service_client.js +359 -0
  227. package/build/src/v1beta/user_event_service_client.d.ts +265 -2
  228. package/build/src/v1beta/user_event_service_client.js +359 -0
  229. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -20,8 +20,10 @@ import "google/api/annotations.proto";
20
20
  import "google/api/client.proto";
21
21
  import "google/api/field_behavior.proto";
22
22
  import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1/answer.proto";
23
24
  import "google/cloud/discoveryengine/v1/conversation.proto";
24
25
  import "google/cloud/discoveryengine/v1/search_service.proto";
26
+ import "google/cloud/discoveryengine/v1/session.proto";
25
27
  import "google/protobuf/empty.proto";
26
28
  import "google/protobuf/field_mask.proto";
27
29
 
@@ -147,6 +149,123 @@ service ConversationalSearchService {
147
149
  };
148
150
  option (google.api.method_signature) = "parent";
149
151
  }
152
+
153
+ // Answer query method.
154
+ rpc AnswerQuery(AnswerQueryRequest) returns (AnswerQueryResponse) {
155
+ option (google.api.http) = {
156
+ post: "/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer"
157
+ body: "*"
158
+ additional_bindings {
159
+ post: "/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer"
160
+ body: "*"
161
+ }
162
+ additional_bindings {
163
+ post: "/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer"
164
+ body: "*"
165
+ }
166
+ };
167
+ }
168
+
169
+ // Gets a Answer.
170
+ rpc GetAnswer(GetAnswerRequest) returns (Answer) {
171
+ option (google.api.http) = {
172
+ get: "/v1/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}"
173
+ additional_bindings {
174
+ get: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}"
175
+ }
176
+ additional_bindings {
177
+ get: "/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}"
178
+ }
179
+ };
180
+ option (google.api.method_signature) = "name";
181
+ }
182
+
183
+ // Creates a Session.
184
+ //
185
+ // If the [Session][google.cloud.discoveryengine.v1.Session] to create already
186
+ // exists, an ALREADY_EXISTS error is returned.
187
+ rpc CreateSession(CreateSessionRequest) returns (Session) {
188
+ option (google.api.http) = {
189
+ post: "/v1/{parent=projects/*/locations/*/dataStores/*}/sessions"
190
+ body: "session"
191
+ additional_bindings {
192
+ post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
193
+ body: "session"
194
+ }
195
+ additional_bindings {
196
+ post: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
197
+ body: "session"
198
+ }
199
+ };
200
+ option (google.api.method_signature) = "parent,session";
201
+ }
202
+
203
+ // Deletes a Session.
204
+ //
205
+ // If the [Session][google.cloud.discoveryengine.v1.Session] to delete does
206
+ // not exist, a NOT_FOUND error is returned.
207
+ rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {
208
+ option (google.api.http) = {
209
+ delete: "/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}"
210
+ additional_bindings {
211
+ delete: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
212
+ }
213
+ additional_bindings {
214
+ delete: "/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
215
+ }
216
+ };
217
+ option (google.api.method_signature) = "name";
218
+ }
219
+
220
+ // Updates a Session.
221
+ //
222
+ // [Session][google.cloud.discoveryengine.v1.Session] action type cannot be
223
+ // changed. If the [Session][google.cloud.discoveryengine.v1.Session] to
224
+ // update does not exist, a NOT_FOUND error is returned.
225
+ rpc UpdateSession(UpdateSessionRequest) returns (Session) {
226
+ option (google.api.http) = {
227
+ patch: "/v1/{session.name=projects/*/locations/*/dataStores/*/sessions/*}"
228
+ body: "session"
229
+ additional_bindings {
230
+ patch: "/v1/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
231
+ body: "session"
232
+ }
233
+ additional_bindings {
234
+ patch: "/v1/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
235
+ body: "session"
236
+ }
237
+ };
238
+ option (google.api.method_signature) = "session,update_mask";
239
+ }
240
+
241
+ // Gets a Session.
242
+ rpc GetSession(GetSessionRequest) returns (Session) {
243
+ option (google.api.http) = {
244
+ get: "/v1/{name=projects/*/locations/*/dataStores/*/sessions/*}"
245
+ additional_bindings {
246
+ get: "/v1/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
247
+ }
248
+ additional_bindings {
249
+ get: "/v1/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
250
+ }
251
+ };
252
+ option (google.api.method_signature) = "name";
253
+ }
254
+
255
+ // Lists all Sessions by their parent
256
+ // [DataStore][google.cloud.discoveryengine.v1.DataStore].
257
+ rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
258
+ option (google.api.http) = {
259
+ get: "/v1/{parent=projects/*/locations/*/dataStores/*}/sessions"
260
+ additional_bindings {
261
+ get: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
262
+ }
263
+ additional_bindings {
264
+ get: "/v1/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
265
+ }
266
+ };
267
+ option (google.api.method_signature) = "parent";
268
+ }
150
269
  }
151
270
 
152
271
  // Request message for
@@ -345,3 +464,453 @@ message ListConversationsResponse {
345
464
  // Pagination token, if not returned indicates the last page.
346
465
  string next_page_token = 2;
347
466
  }
467
+
468
+ // Request message for
469
+ // [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery]
470
+ // method.
471
+ message AnswerQueryRequest {
472
+ // Safety specification.
473
+ message SafetySpec {
474
+ // Enable the safety filtering on the answer response. It is false by
475
+ // default.
476
+ bool enable = 1;
477
+ }
478
+
479
+ // Related questions specification.
480
+ message RelatedQuestionsSpec {
481
+ // Enable related questions feature if true.
482
+ bool enable = 1;
483
+ }
484
+
485
+ // Answer generation specification.
486
+ message AnswerGenerationSpec {
487
+ // Answer Generation Model specification.
488
+ message ModelSpec {
489
+ // Model version. If not set, it will use the default stable model.
490
+ // Allowed values are: stable, preview.
491
+ string model_version = 1;
492
+ }
493
+
494
+ // Answer generation prompt specification.
495
+ message PromptSpec {
496
+ // Customized preamble.
497
+ string preamble = 1;
498
+ }
499
+
500
+ // Answer generation model specification.
501
+ ModelSpec model_spec = 1;
502
+
503
+ // Answer generation prompt specification.
504
+ PromptSpec prompt_spec = 2;
505
+
506
+ // Specifies whether to include citation metadata in the answer. The default
507
+ // value is `false`.
508
+ bool include_citations = 3;
509
+
510
+ // Language code for Answer. Use language tags defined by
511
+ // [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
512
+ // Note: This is an experimental feature.
513
+ string answer_language_code = 4;
514
+
515
+ // Specifies whether to filter out adversarial queries. The default value
516
+ // is `false`.
517
+ //
518
+ // Google employs search-query classification to detect adversarial
519
+ // queries. No answer is returned if the search query is classified as an
520
+ // adversarial query. For example, a user might ask a question regarding
521
+ // negative comments about the company or submit a query designed to
522
+ // generate unsafe, policy-violating output. If this field is set to
523
+ // `true`, we skip generating answers for adversarial queries and return
524
+ // fallback messages instead.
525
+ bool ignore_adversarial_query = 5;
526
+
527
+ // Specifies whether to filter out queries that are not answer-seeking.
528
+ // The default value is `false`.
529
+ //
530
+ // Google employs search-query classification to detect answer-seeking
531
+ // queries. No answer is returned if the search query is classified as a
532
+ // non-answer seeking query. If this field is set to `true`, we skip
533
+ // generating answers for non-answer seeking queries and return
534
+ // fallback messages instead.
535
+ bool ignore_non_answer_seeking_query = 6;
536
+
537
+ // Specifies whether to filter out queries that have low relevance.
538
+ //
539
+ // If this field is set to `false`, all search results are used regardless
540
+ // of relevance to generate answers. If set to `true` or unset, the behavior
541
+ // will be determined automatically by the service.
542
+ optional bool ignore_low_relevant_content = 7;
543
+ }
544
+
545
+ // Search specification.
546
+ message SearchSpec {
547
+ // Search parameters.
548
+ message SearchParams {
549
+ // Number of search results to return.
550
+ // The default value is 10.
551
+ int32 max_return_results = 1;
552
+
553
+ // The filter syntax consists of an expression language for constructing
554
+ // a predicate from one or more fields of the documents being filtered.
555
+ // Filter expression is case-sensitive. This will be used to filter
556
+ // search results which may affect the Answer response.
557
+ //
558
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
559
+ //
560
+ // Filtering in Vertex AI Search is done by mapping the LHS filter key
561
+ // to a key property defined in the Vertex AI Search backend -- this
562
+ // mapping is defined by the customer in their schema. For example a
563
+ // media customers might have a field 'name' in their schema. In this
564
+ // case the filter would look like this: filter --> name:'ANY("king
565
+ // kong")'
566
+ //
567
+ // For more information about filtering including syntax and filter
568
+ // operators, see
569
+ // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
570
+ string filter = 2;
571
+
572
+ // Boost specification to boost certain documents in search results which
573
+ // may affect the answer query response. For more information on boosting,
574
+ // see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
575
+ SearchRequest.BoostSpec boost_spec = 3;
576
+
577
+ // The order in which documents are returned. Documents can be ordered
578
+ // by a field in an [Document][google.cloud.discoveryengine.v1.Document]
579
+ // object. Leave it unset if ordered by relevance. `order_by` expression
580
+ // is case-sensitive. For more information on ordering, see
581
+ // [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
582
+ //
583
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
584
+ string order_by = 4;
585
+
586
+ // Specs defining dataStores to filter on in a search call and
587
+ // configurations for those dataStores. This is only considered for
588
+ // engines with multiple dataStores use case. For single dataStore within
589
+ // an engine, they should use the specs at the top level.
590
+ repeated SearchRequest.DataStoreSpec data_store_specs = 7;
591
+ }
592
+
593
+ // Search result list.
594
+ message SearchResultList {
595
+ // Search result.
596
+ message SearchResult {
597
+ // Unstructured document information.
598
+ message UnstructuredDocumentInfo {
599
+ // Document context.
600
+ message DocumentContext {
601
+ // Page identifier.
602
+ string page_identifier = 1;
603
+
604
+ // Document content.
605
+ string content = 2;
606
+ }
607
+
608
+ // Extractive segment.
609
+ // [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
610
+ message ExtractiveSegment {
611
+ // Page identifier.
612
+ string page_identifier = 1;
613
+
614
+ // Extractive segment content.
615
+ string content = 2;
616
+ }
617
+
618
+ // Extractive answer.
619
+ // [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
620
+ message ExtractiveAnswer {
621
+ // Page identifier.
622
+ string page_identifier = 1;
623
+
624
+ // Extractive answer content.
625
+ string content = 2;
626
+ }
627
+
628
+ // Document resource name.
629
+ string document = 1 [(google.api.resource_reference) = {
630
+ type: "discoveryengine.googleapis.com/Document"
631
+ }];
632
+
633
+ // URI for the document.
634
+ string uri = 2;
635
+
636
+ // Title.
637
+ string title = 3;
638
+
639
+ // List of document contexts.
640
+ repeated DocumentContext document_contexts = 4;
641
+
642
+ // List of extractive segments.
643
+ repeated ExtractiveSegment extractive_segments = 5;
644
+
645
+ // List of extractive answers.
646
+ repeated ExtractiveAnswer extractive_answers = 6;
647
+ }
648
+
649
+ // Chunk information.
650
+ message ChunkInfo {
651
+ // Chunk resource name.
652
+ string chunk = 1 [(google.api.resource_reference) = {
653
+ type: "discoveryengine.googleapis.com/Chunk"
654
+ }];
655
+
656
+ // Chunk textual content.
657
+ string content = 2;
658
+ }
659
+
660
+ // Search result content.
661
+ oneof content {
662
+ // Unstructured document information.
663
+ UnstructuredDocumentInfo unstructured_document_info = 1;
664
+
665
+ // Chunk information.
666
+ ChunkInfo chunk_info = 2;
667
+ }
668
+ }
669
+
670
+ // Search results.
671
+ repeated SearchResult search_results = 1;
672
+ }
673
+
674
+ // Search parameters to control the search behavior.
675
+ // Or provide search result list to generate answer.
676
+ oneof input {
677
+ // Search parameters.
678
+ SearchParams search_params = 1;
679
+
680
+ // Search result list.
681
+ SearchResultList search_result_list = 2;
682
+ }
683
+ }
684
+
685
+ // Query understanding specification.
686
+ message QueryUnderstandingSpec {
687
+ // Query classification specification.
688
+ message QueryClassificationSpec {
689
+ // Query classification types.
690
+ enum Type {
691
+ // Unspecified query classification type.
692
+ TYPE_UNSPECIFIED = 0;
693
+
694
+ // Adversarial query classification type.
695
+ ADVERSARIAL_QUERY = 1;
696
+
697
+ // Non-answer-seeking query classification type.
698
+ NON_ANSWER_SEEKING_QUERY = 2;
699
+ }
700
+
701
+ // Enabled query classification types.
702
+ repeated Type types = 1;
703
+ }
704
+
705
+ // Query rephraser specification.
706
+ message QueryRephraserSpec {
707
+ // Disable query rephraser.
708
+ bool disable = 1;
709
+ }
710
+
711
+ // Query classification specification.
712
+ QueryClassificationSpec query_classification_spec = 1;
713
+
714
+ // Query rephraser specification.
715
+ QueryRephraserSpec query_rephraser_spec = 2;
716
+ }
717
+
718
+ // Required. The resource name of the Search serving config, such as
719
+ // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
720
+ // or
721
+ // `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
722
+ // This field is used to identify the serving configuration name, set
723
+ // of models used to make the search.
724
+ string serving_config = 1 [
725
+ (google.api.field_behavior) = REQUIRED,
726
+ (google.api.resource_reference) = {
727
+ type: "discoveryengine.googleapis.com/ServingConfig"
728
+ }
729
+ ];
730
+
731
+ // Required. Current user query.
732
+ Query query = 2 [(google.api.field_behavior) = REQUIRED];
733
+
734
+ // The session resource name. Not required.
735
+ //
736
+ // When session field is not set, the API is in sessionless mode.
737
+ //
738
+ // We support auto session mode: users can use the wildcard symbol `-` as
739
+ // session ID. A new ID will be automatically generated and assigned.
740
+ string session = 3 [(google.api.resource_reference) = {
741
+ type: "discoveryengine.googleapis.com/Session"
742
+ }];
743
+
744
+ // Model specification.
745
+ SafetySpec safety_spec = 4;
746
+
747
+ // Related questions specification.
748
+ RelatedQuestionsSpec related_questions_spec = 5;
749
+
750
+ // Answer generation specification.
751
+ AnswerGenerationSpec answer_generation_spec = 7;
752
+
753
+ // Search specification.
754
+ SearchSpec search_spec = 8;
755
+
756
+ // Query understanding specification.
757
+ QueryUnderstandingSpec query_understanding_spec = 9;
758
+
759
+ // Asynchronous mode control.
760
+ //
761
+ // If enabled, the response will be returned with answer/session resource
762
+ // name without final answer. The API users need to do the polling to get
763
+ // the latest status of answer/session by calling
764
+ // [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer]
765
+ // or
766
+ // [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
767
+ // method.
768
+ bool asynchronous_mode = 10;
769
+
770
+ // A unique identifier for tracking visitors. For example, this could be
771
+ // implemented with an HTTP cookie, which should be able to uniquely identify
772
+ // a visitor on a single device. This unique identifier should not change if
773
+ // the visitor logs in or out of the website.
774
+ //
775
+ // This field should NOT have a fixed value such as `unknown_visitor`.
776
+ //
777
+ // The field must be a UTF-8 encoded string with a length limit of 128
778
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
779
+ string user_pseudo_id = 12;
780
+ }
781
+
782
+ // Response message for
783
+ // [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1.ConversationalSearchService.AnswerQuery]
784
+ // method.
785
+ message AnswerQueryResponse {
786
+ // Answer resource object.
787
+ // If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1,
788
+ // use [Answer.name][google.cloud.discoveryengine.v1.Answer.name] to fetch
789
+ // answer information using
790
+ // [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1.ConversationalSearchService.GetAnswer]
791
+ // API.
792
+ Answer answer = 1;
793
+
794
+ // Session resource object.
795
+ // It will be only available when session field is set and valid in the
796
+ // [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest]
797
+ // request.
798
+ Session session = 2;
799
+
800
+ // A global unique ID used for logging.
801
+ string answer_query_token = 3;
802
+ }
803
+
804
+ // Request for GetAnswer method.
805
+ message GetAnswerRequest {
806
+ // Required. The resource name of the Answer to get. Format:
807
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
808
+ string name = 1 [
809
+ (google.api.field_behavior) = REQUIRED,
810
+ (google.api.resource_reference) = {
811
+ type: "discoveryengine.googleapis.com/Answer"
812
+ }
813
+ ];
814
+ }
815
+
816
+ // Request for CreateSession method.
817
+ message CreateSessionRequest {
818
+ // Required. Full resource name of parent data store. Format:
819
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
820
+ string parent = 1 [
821
+ (google.api.field_behavior) = REQUIRED,
822
+ (google.api.resource_reference) = {
823
+ type: "discoveryengine.googleapis.com/DataStore"
824
+ }
825
+ ];
826
+
827
+ // Required. The session to create.
828
+ Session session = 2 [(google.api.field_behavior) = REQUIRED];
829
+ }
830
+
831
+ // Request for UpdateSession method.
832
+ message UpdateSessionRequest {
833
+ // Required. The Session to update.
834
+ Session session = 1 [(google.api.field_behavior) = REQUIRED];
835
+
836
+ // Indicates which fields in the provided
837
+ // [Session][google.cloud.discoveryengine.v1.Session] to update. The following
838
+ // are NOT supported:
839
+ //
840
+ // * [Session.name][google.cloud.discoveryengine.v1.Session.name]
841
+ //
842
+ // If not set or empty, all supported fields are updated.
843
+ google.protobuf.FieldMask update_mask = 2;
844
+ }
845
+
846
+ // Request for DeleteSession method.
847
+ message DeleteSessionRequest {
848
+ // Required. The resource name of the Session to delete. Format:
849
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
850
+ string name = 1 [
851
+ (google.api.field_behavior) = REQUIRED,
852
+ (google.api.resource_reference) = {
853
+ type: "discoveryengine.googleapis.com/Session"
854
+ }
855
+ ];
856
+ }
857
+
858
+ // Request for GetSession method.
859
+ message GetSessionRequest {
860
+ // Required. The resource name of the Session to get. Format:
861
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
862
+ string name = 1 [
863
+ (google.api.field_behavior) = REQUIRED,
864
+ (google.api.resource_reference) = {
865
+ type: "discoveryengine.googleapis.com/Session"
866
+ }
867
+ ];
868
+ }
869
+
870
+ // Request for ListSessions method.
871
+ message ListSessionsRequest {
872
+ // Required. The data store resource name. Format:
873
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
874
+ string parent = 1 [
875
+ (google.api.field_behavior) = REQUIRED,
876
+ (google.api.resource_reference) = {
877
+ type: "discoveryengine.googleapis.com/DataStore"
878
+ }
879
+ ];
880
+
881
+ // Maximum number of results to return. If unspecified, defaults
882
+ // to 50. Max allowed value is 1000.
883
+ int32 page_size = 2;
884
+
885
+ // A page token, received from a previous `ListSessions` call.
886
+ // Provide this to retrieve the subsequent page.
887
+ string page_token = 3;
888
+
889
+ // A filter to apply on the list results. The supported features are:
890
+ // user_pseudo_id, state.
891
+ //
892
+ // Example:
893
+ // "user_pseudo_id = some_id"
894
+ string filter = 4;
895
+
896
+ // A comma-separated list of fields to order by, sorted in ascending order.
897
+ // Use "desc" after a field name for descending.
898
+ // Supported fields:
899
+ // * `update_time`
900
+ // * `create_time`
901
+ // * `session_name`
902
+ //
903
+ // Example:
904
+ // "update_time desc"
905
+ // "create_time"
906
+ string order_by = 5;
907
+ }
908
+
909
+ // Response for ListSessions method.
910
+ message ListSessionsResponse {
911
+ // All the Sessions for a given data store.
912
+ repeated Session sessions = 1;
913
+
914
+ // Pagination token, if not returned indicates the last page.
915
+ string next_page_token = 2;
916
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ package google.cloud.discoveryengine.v1;
19
19
  import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
21
  import "google/cloud/discoveryengine/v1/common.proto";
22
+ import "google/cloud/discoveryengine/v1/document_processing_config.proto";
22
23
  import "google/cloud/discoveryengine/v1/schema.proto";
23
24
  import "google/protobuf/timestamp.proto";
24
25
 
@@ -97,6 +98,9 @@ message DataStore {
97
98
  google.protobuf.Timestamp create_time = 4
98
99
  [(google.api.field_behavior) = OUTPUT_ONLY];
99
100
 
101
+ // Configuration for Document understanding and enrichment.
102
+ DocumentProcessingConfig document_processing_config = 27;
103
+
100
104
  // The start schema to use for this
101
105
  // [DataStore][google.cloud.discoveryengine.v1.DataStore] when provisioning
102
106
  // it. If unset, a default vertical specialized schema will be used.
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -226,8 +226,8 @@ message ListDataStoresRequest {
226
226
  // INVALID_ARGUMENT error is returned.
227
227
  string page_token = 3;
228
228
 
229
- // Filter by solution type. For example: filter =
230
- // 'solution_type:SOLUTION_TYPE_SEARCH'
229
+ // Filter by solution type .
230
+ // For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
231
231
  string filter = 4;
232
232
  }
233
233
 
@@ -1,4 +1,4 @@
1
- // Copyright 2022 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.