google-cloud-dialogflow-v2 1.0.0 → 1.1.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -1
  3. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
  4. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +5 -1
  5. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -1
  6. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  7. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +3 -0
  8. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +121 -23
  9. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +19 -0
  10. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +114 -23
  11. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +60 -0
  12. data/lib/google/cloud/dialogflow/v2/encryption_spec_pb.rb +52 -0
  13. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +567 -0
  14. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb +52 -0
  15. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +809 -0
  16. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb +50 -0
  17. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +535 -0
  18. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +922 -0
  19. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +188 -0
  20. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb +54 -0
  21. data/lib/google/cloud/dialogflow/v2/encryption_spec_service.rb +56 -0
  22. data/lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb +51 -0
  23. data/lib/google/cloud/dialogflow/v2/generator_pb.rb +71 -0
  24. data/lib/google/cloud/dialogflow/v2/generator_services_pb.rb +57 -0
  25. data/lib/google/cloud/dialogflow/v2/generators/client.rb +851 -0
  26. data/lib/google/cloud/dialogflow/v2/generators/credentials.rb +52 -0
  27. data/lib/google/cloud/dialogflow/v2/generators/paths.rb +66 -0
  28. data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +798 -0
  29. data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +381 -0
  30. data/lib/google/cloud/dialogflow/v2/generators/rest.rb +57 -0
  31. data/lib/google/cloud/dialogflow/v2/generators.rb +59 -0
  32. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -1
  33. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +2 -0
  34. data/lib/google/cloud/dialogflow/v2/participants/client.rb +110 -0
  35. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +103 -0
  36. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +68 -0
  37. data/lib/google/cloud/dialogflow/v2/rest.rb +2 -0
  38. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  39. data/lib/google/cloud/dialogflow/v2.rb +2 -0
  40. data/proto_docs/google/api/client.rb +14 -10
  41. data/proto_docs/google/api/resource.rb +7 -2
  42. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +22 -0
  43. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +24 -0
  44. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +54 -26
  45. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +27 -2
  46. data/proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb +81 -0
  47. data/proto_docs/google/cloud/dialogflow/v2/generator.rb +382 -0
  48. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +133 -0
  49. metadata +24 -2
@@ -0,0 +1,382 @@
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 Dialogflow
23
+ module V2
24
+ # Request message of CreateGenerator.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The project/location to create generator for. Format:
28
+ # `projects/<Project ID>/locations/<Location ID>`
29
+ # @!attribute [rw] generator
30
+ # @return [::Google::Cloud::Dialogflow::V2::Generator]
31
+ # Required. The generator to create.
32
+ # @!attribute [rw] generator_id
33
+ # @return [::String]
34
+ # Optional. The ID to use for the generator, which will become the final
35
+ # component of the generator's resource name.
36
+ #
37
+ # The generator ID must be compliant with the regression fomula
38
+ # `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64].
39
+ # If the field is not provided, an Id will be auto-generated.
40
+ # If the field is provided, the caller is resposible for
41
+ # 1. the uniqueness of the ID, otherwise the request will be rejected.
42
+ # 2. the consistency for whether to use custom ID or not under a project to
43
+ # better ensure uniqueness.
44
+ class CreateGeneratorRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request message of GetGenerator.
50
+ # @!attribute [rw] name
51
+ # @return [::String]
52
+ # Required. The generator resource name to retrieve. Format:
53
+ # `projects/<Project ID>/locations/<Location ID>`/generators/<Generator ID>`
54
+ class GetGeneratorRequest
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # Request message of ListGenerators.
60
+ # @!attribute [rw] parent
61
+ # @return [::String]
62
+ # Required. The project/location to list generators for. Format:
63
+ # `projects/<Project ID>/locations/<Location ID>`
64
+ # @!attribute [rw] page_size
65
+ # @return [::Integer]
66
+ # Optional. Maximum number of conversation models to return in a single page.
67
+ # Default to 10.
68
+ # @!attribute [rw] page_token
69
+ # @return [::String]
70
+ # Optional. The next_page_token value returned from a previous list request.
71
+ class ListGeneratorsRequest
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Response of ListGenerators.
77
+ # @!attribute [rw] generators
78
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Generator>]
79
+ # List of generators retrieved.
80
+ # @!attribute [rw] next_page_token
81
+ # @return [::String]
82
+ # Token to retrieve the next page of results, or empty if there are no more
83
+ # results in the list.
84
+ class ListGeneratorsResponse
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+
89
+ # Request of DeleteGenerator.
90
+ # @!attribute [rw] name
91
+ # @return [::String]
92
+ # Required. The generator resource name to delete. Format:
93
+ # `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
94
+ class DeleteGeneratorRequest
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+
99
+ # Request of UpdateGenerator.
100
+ # @!attribute [rw] generator
101
+ # @return [::Google::Cloud::Dialogflow::V2::Generator]
102
+ # Required. The generator to update.
103
+ # The name field of generator is to identify the generator to update.
104
+ # @!attribute [rw] update_mask
105
+ # @return [::Google::Protobuf::FieldMask]
106
+ # Optional. The list of fields to update.
107
+ class UpdateGeneratorRequest
108
+ include ::Google::Protobuf::MessageExts
109
+ extend ::Google::Protobuf::MessageExts::ClassMethods
110
+ end
111
+
112
+ # Represents a message entry of a conversation.
113
+ # @!attribute [rw] role
114
+ # @return [::Google::Cloud::Dialogflow::V2::MessageEntry::Role]
115
+ # Optional. Participant role of the message.
116
+ # @!attribute [rw] text
117
+ # @return [::String]
118
+ # Optional. Transcript content of the message.
119
+ # @!attribute [rw] language_code
120
+ # @return [::String]
121
+ # Optional. The language of the text. See [Language
122
+ # Support](https://cloud.google.com/dialogflow/docs/reference/language) for a
123
+ # list of the currently supported language codes.
124
+ # @!attribute [rw] create_time
125
+ # @return [::Google::Protobuf::Timestamp]
126
+ # Optional. Create time of the message entry.
127
+ class MessageEntry
128
+ include ::Google::Protobuf::MessageExts
129
+ extend ::Google::Protobuf::MessageExts::ClassMethods
130
+
131
+ # Enumeration of the roles a participant can play in a conversation.
132
+ module Role
133
+ # Participant role not set.
134
+ ROLE_UNSPECIFIED = 0
135
+
136
+ # Participant is a human agent.
137
+ HUMAN_AGENT = 1
138
+
139
+ # Participant is an automated agent, such as a Dialogflow agent.
140
+ AUTOMATED_AGENT = 2
141
+
142
+ # Participant is an end user that has called or chatted with
143
+ # Dialogflow services.
144
+ END_USER = 3
145
+ end
146
+ end
147
+
148
+ # Context of the conversation, including transcripts.
149
+ # @!attribute [rw] message_entries
150
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::MessageEntry>]
151
+ # Optional. List of message transcripts in the conversation.
152
+ class ConversationContext
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+ end
156
+
157
+ # List of summarization sections.
158
+ # @!attribute [rw] summarization_sections
159
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SummarizationSection>]
160
+ # Optional. Summarization sections.
161
+ class SummarizationSectionList
162
+ include ::Google::Protobuf::MessageExts
163
+ extend ::Google::Protobuf::MessageExts::ClassMethods
164
+ end
165
+
166
+ # Providing examples in the generator (i.e. building a few-shot generator)
167
+ # helps convey the desired format of the LLM response.
168
+ # NEXT_ID: 10
169
+ # @!attribute [rw] conversation_context
170
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationContext]
171
+ # Optional. Conversation transcripts.
172
+ # @!attribute [rw] extra_info
173
+ # @return [::Google::Protobuf::Map{::String => ::String}]
174
+ # Optional. Key is the placeholder field name in input, value is the value of
175
+ # the placeholder. E.g. instruction contains "@price", and ingested data has
176
+ # <"price", "10">
177
+ # @!attribute [rw] summarization_section_list
178
+ # @return [::Google::Cloud::Dialogflow::V2::SummarizationSectionList]
179
+ # Summarization sections.
180
+ # @!attribute [rw] output
181
+ # @return [::Google::Cloud::Dialogflow::V2::GeneratorSuggestion]
182
+ # Required. Example output of the model.
183
+ class FewShotExample
184
+ include ::Google::Protobuf::MessageExts
185
+ extend ::Google::Protobuf::MessageExts::ClassMethods
186
+
187
+ # @!attribute [rw] key
188
+ # @return [::String]
189
+ # @!attribute [rw] value
190
+ # @return [::String]
191
+ class ExtraInfoEntry
192
+ include ::Google::Protobuf::MessageExts
193
+ extend ::Google::Protobuf::MessageExts::ClassMethods
194
+ end
195
+ end
196
+
197
+ # The parameters of inference.
198
+ # @!attribute [rw] max_output_tokens
199
+ # @return [::Integer]
200
+ # Optional. Maximum number of the output tokens for the generator.
201
+ # @!attribute [rw] temperature
202
+ # @return [::Float]
203
+ # Optional. Controls the randomness of LLM predictions.
204
+ # Low temperature = less random. High temperature = more random.
205
+ # If unset (or 0), uses a default value of 0.
206
+ # @!attribute [rw] top_k
207
+ # @return [::Integer]
208
+ # Optional. Top-k changes how the model selects tokens for output. A top-k of
209
+ # 1 means the selected token is the most probable among all tokens in the
210
+ # model's vocabulary (also called greedy decoding), while a top-k of 3 means
211
+ # that the next token is selected from among the 3 most probable tokens
212
+ # (using temperature). For each token selection step, the top K tokens with
213
+ # the highest probabilities are sampled. Then tokens are further filtered
214
+ # based on topP with the final token selected using temperature sampling.
215
+ # Specify a lower value for less random responses and a higher value for more
216
+ # random responses. Acceptable value is [1, 40], default to 40.
217
+ # @!attribute [rw] top_p
218
+ # @return [::Float]
219
+ # Optional. Top-p changes how the model selects tokens for output. Tokens are
220
+ # selected from most K (see topK parameter) probable to least until the sum
221
+ # of their probabilities equals the top-p value. For example, if tokens A, B,
222
+ # and C have a probability of 0.3, 0.2, and 0.1 and the top-p value is 0.5,
223
+ # then the model will select either A or B as the next token (using
224
+ # temperature) and doesn't consider C. The default top-p value is 0.95.
225
+ # Specify a lower value for less random responses and a higher value for more
226
+ # random responses. Acceptable value is [0.0, 1.0], default to 0.95.
227
+ class InferenceParameter
228
+ include ::Google::Protobuf::MessageExts
229
+ extend ::Google::Protobuf::MessageExts::ClassMethods
230
+ end
231
+
232
+ # Represents the section of summarization.
233
+ # @!attribute [rw] key
234
+ # @return [::String]
235
+ # Optional. Name of the section, for example, "situation".
236
+ # @!attribute [rw] definition
237
+ # @return [::String]
238
+ # Optional. Definition of the section, for example, "what the customer needs
239
+ # help with or has question about."
240
+ # @!attribute [rw] type
241
+ # @return [::Google::Cloud::Dialogflow::V2::SummarizationSection::Type]
242
+ # Optional. Type of the summarization section.
243
+ class SummarizationSection
244
+ include ::Google::Protobuf::MessageExts
245
+ extend ::Google::Protobuf::MessageExts::ClassMethods
246
+
247
+ # Type enum of the summarization sections.
248
+ module Type
249
+ # Undefined section type, does not return anything.
250
+ TYPE_UNSPECIFIED = 0
251
+
252
+ # What the customer needs help with or has question about.
253
+ # Section name: "situation".
254
+ SITUATION = 1
255
+
256
+ # What the agent does to help the customer.
257
+ # Section name: "action".
258
+ ACTION = 2
259
+
260
+ # Result of the customer service. A single word describing the result
261
+ # of the conversation.
262
+ # Section name: "resolution".
263
+ RESOLUTION = 3
264
+
265
+ # Reason for cancellation if the customer requests for a cancellation.
266
+ # "N/A" otherwise.
267
+ # Section name: "reason_for_cancellation".
268
+ REASON_FOR_CANCELLATION = 4
269
+
270
+ # "Unsatisfied" or "Satisfied" depending on the customer's feelings at
271
+ # the end of the conversation.
272
+ # Section name: "customer_satisfaction".
273
+ CUSTOMER_SATISFACTION = 5
274
+
275
+ # Key entities extracted from the conversation, such as ticket number,
276
+ # order number, dollar amount, etc.
277
+ # Section names are prefixed by "entities/".
278
+ ENTITIES = 6
279
+
280
+ # Customer defined sections.
281
+ CUSTOMER_DEFINED = 7
282
+ end
283
+ end
284
+
285
+ # Summarization context that customer can configure.
286
+ # @!attribute [rw] summarization_sections
287
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SummarizationSection>]
288
+ # Optional. List of sections. Note it contains both predefined section sand
289
+ # customer defined sections.
290
+ # @!attribute [rw] few_shot_examples
291
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::FewShotExample>]
292
+ # Optional. List of few shot examples.
293
+ # @!attribute [rw] version
294
+ # @return [::String]
295
+ # Optional. Version of the feature. If not set, default to latest version.
296
+ # Current candidates are ["1.0"].
297
+ # @!attribute [rw] output_language_code
298
+ # @return [::String]
299
+ # Optional. The target language of the generated summary. The language code
300
+ # for conversation will be used if this field is empty. Supported 2.0 and
301
+ # later versions.
302
+ class SummarizationContext
303
+ include ::Google::Protobuf::MessageExts
304
+ extend ::Google::Protobuf::MessageExts::ClassMethods
305
+ end
306
+
307
+ # LLM generator.
308
+ # @!attribute [r] name
309
+ # @return [::String]
310
+ # Output only. Identifier. The resource name of the generator. Format:
311
+ # `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
312
+ # @!attribute [rw] description
313
+ # @return [::String]
314
+ # Optional. Human readable description of the generator.
315
+ # @!attribute [rw] summarization_context
316
+ # @return [::Google::Cloud::Dialogflow::V2::SummarizationContext]
317
+ # Input of prebuilt Summarization feature.
318
+ # @!attribute [rw] inference_parameter
319
+ # @return [::Google::Cloud::Dialogflow::V2::InferenceParameter]
320
+ # Optional. Inference parameters for this generator.
321
+ # @!attribute [rw] trigger_event
322
+ # @return [::Google::Cloud::Dialogflow::V2::TriggerEvent]
323
+ # Optional. The trigger event of the generator. It defines when the generator
324
+ # is triggered in a conversation.
325
+ # @!attribute [r] create_time
326
+ # @return [::Google::Protobuf::Timestamp]
327
+ # Output only. Creation time of this generator.
328
+ # @!attribute [r] update_time
329
+ # @return [::Google::Protobuf::Timestamp]
330
+ # Output only. Update time of this generator.
331
+ class Generator
332
+ include ::Google::Protobuf::MessageExts
333
+ extend ::Google::Protobuf::MessageExts::ClassMethods
334
+ end
335
+
336
+ # Suggested summary of the conversation.
337
+ # @!attribute [rw] summary_sections
338
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SummarySuggestion::SummarySection>]
339
+ # Required. All the parts of generated summary.
340
+ class SummarySuggestion
341
+ include ::Google::Protobuf::MessageExts
342
+ extend ::Google::Protobuf::MessageExts::ClassMethods
343
+
344
+ # A component of the generated summary.
345
+ # @!attribute [rw] section
346
+ # @return [::String]
347
+ # Required. Name of the section.
348
+ # @!attribute [rw] summary
349
+ # @return [::String]
350
+ # Required. Summary text for the section.
351
+ class SummarySection
352
+ include ::Google::Protobuf::MessageExts
353
+ extend ::Google::Protobuf::MessageExts::ClassMethods
354
+ end
355
+ end
356
+
357
+ # Suggestion generated using a Generator.
358
+ # @!attribute [rw] summary_suggestion
359
+ # @return [::Google::Cloud::Dialogflow::V2::SummarySuggestion]
360
+ # Optional. Suggested summary.
361
+ class GeneratorSuggestion
362
+ include ::Google::Protobuf::MessageExts
363
+ extend ::Google::Protobuf::MessageExts::ClassMethods
364
+ end
365
+
366
+ # The event that triggers the generator and LLM execution.
367
+ module TriggerEvent
368
+ # Default value for TriggerEvent.
369
+ TRIGGER_EVENT_UNSPECIFIED = 0
370
+
371
+ # Triggers when each chat message or voice utterance ends.
372
+ END_OF_UTTERANCE = 1
373
+
374
+ # Triggers on the conversation manually by API calls, such as
375
+ # Conversations.GenerateStatelessSuggestion and
376
+ # Conversations.GenerateSuggestions.
377
+ MANUAL_CALL = 2
378
+ end
379
+ end
380
+ end
381
+ end
382
+ end
@@ -909,6 +909,9 @@ module Google
909
909
  # @!attribute [rw] suggest_articles_response
910
910
  # @return [::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse]
911
911
  # SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
912
+ # @!attribute [rw] suggest_knowledge_assist_response
913
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
914
+ # SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST.
912
915
  # @!attribute [rw] suggest_faq_answers_response
913
916
  # @return [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
914
917
  # SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
@@ -1021,6 +1024,136 @@ module Google
1021
1024
  extend ::Google::Protobuf::MessageExts::ClassMethods
1022
1025
  end
1023
1026
  end
1027
+
1028
+ # The request message for
1029
+ # {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_knowledge_assist Participants.SuggestKnowledgeAssist}.
1030
+ # @!attribute [rw] parent
1031
+ # @return [::String]
1032
+ # Required. The name of the participant to fetch suggestions for.
1033
+ # Format: `projects/<Project ID>/locations/<Location
1034
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
1035
+ # @!attribute [rw] latest_message
1036
+ # @return [::String]
1037
+ # Optional. The name of the latest conversation message to compile
1038
+ # suggestions for. If empty, it will be the latest message of the
1039
+ # conversation. Format: `projects/<Project ID>/locations/<Location
1040
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
1041
+ # @!attribute [rw] context_size
1042
+ # @return [::Integer]
1043
+ # Optional. Max number of messages prior to and including
1044
+ # {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest#latest_message latest_message}
1045
+ # to use as context when compiling the suggestion. The context size is by
1046
+ # default 100 and at most 100.
1047
+ # @!attribute [rw] previous_suggested_query
1048
+ # @return [::String]
1049
+ # Optional. The previously suggested query for the given conversation. This
1050
+ # helps identify whether the next suggestion we generate is resonably
1051
+ # different from the previous one. This is useful to avoid similar
1052
+ # suggestions within the conversation.
1053
+ class SuggestKnowledgeAssistRequest
1054
+ include ::Google::Protobuf::MessageExts
1055
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1056
+ end
1057
+
1058
+ # The response message for
1059
+ # {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_knowledge_assist Participants.SuggestKnowledgeAssist}.
1060
+ # @!attribute [r] knowledge_assist_answer
1061
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer]
1062
+ # Output only. Knowledge Assist suggestion.
1063
+ # @!attribute [rw] latest_message
1064
+ # @return [::String]
1065
+ # The name of the latest conversation message used to compile suggestion for.
1066
+ # Format: `projects/<Project ID>/locations/<Location
1067
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
1068
+ # @!attribute [rw] context_size
1069
+ # @return [::Integer]
1070
+ # Number of messages prior to and including
1071
+ # {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse#latest_message latest_message}
1072
+ # to compile the suggestion. It may be smaller than the
1073
+ # {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest#context_size SuggestKnowledgeAssistRequest.context_size}
1074
+ # field in the request if there are fewer messages in the conversation.
1075
+ class SuggestKnowledgeAssistResponse
1076
+ include ::Google::Protobuf::MessageExts
1077
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1078
+ end
1079
+
1080
+ # Represents a Knowledge Assist answer.
1081
+ # @!attribute [rw] suggested_query
1082
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::SuggestedQuery]
1083
+ # The query suggested based on the context. Suggestion is made only if it
1084
+ # is different from the previous suggestion.
1085
+ # @!attribute [rw] suggested_query_answer
1086
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer]
1087
+ # The answer generated for the suggested query. Whether or not an answer is
1088
+ # generated depends on how confident we are about the generated query.
1089
+ # @!attribute [rw] answer_record
1090
+ # @return [::String]
1091
+ # The name of the answer record.
1092
+ # Format: `projects/<Project ID>/locations/<location ID>/answer
1093
+ # Records/<Answer Record ID>`.
1094
+ class KnowledgeAssistAnswer
1095
+ include ::Google::Protobuf::MessageExts
1096
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1097
+
1098
+ # Represents a suggested query.
1099
+ # @!attribute [rw] query_text
1100
+ # @return [::String]
1101
+ # Suggested query text.
1102
+ class SuggestedQuery
1103
+ include ::Google::Protobuf::MessageExts
1104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1105
+ end
1106
+
1107
+ # Represents an answer from Knowledge. Currently supports FAQ and Generative
1108
+ # answers.
1109
+ # @!attribute [rw] answer_text
1110
+ # @return [::String]
1111
+ # The piece of text from the `source` that answers this suggested query.
1112
+ # @!attribute [rw] faq_source
1113
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource]
1114
+ # Populated if the prediction came from FAQ.
1115
+ # @!attribute [rw] generative_source
1116
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
1117
+ # Populated if the prediction was Generative.
1118
+ class KnowledgeAnswer
1119
+ include ::Google::Protobuf::MessageExts
1120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1121
+
1122
+ # Details about source of FAQ answer.
1123
+ # @!attribute [rw] question
1124
+ # @return [::String]
1125
+ # The corresponding FAQ question.
1126
+ class FaqSource
1127
+ include ::Google::Protobuf::MessageExts
1128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1129
+ end
1130
+
1131
+ # Details about source of Generative answer.
1132
+ # @!attribute [rw] snippets
1133
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
1134
+ # All snippets used for this Generative Prediction, with their source URI
1135
+ # and data.
1136
+ class GenerativeSource
1137
+ include ::Google::Protobuf::MessageExts
1138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1139
+
1140
+ # Snippet Source for a Generative Prediction.
1141
+ # @!attribute [rw] uri
1142
+ # @return [::String]
1143
+ # URI the data is sourced from.
1144
+ # @!attribute [rw] text
1145
+ # @return [::String]
1146
+ # Text taken from that URI.
1147
+ # @!attribute [rw] title
1148
+ # @return [::String]
1149
+ # Title of the document.
1150
+ class Snippet
1151
+ include ::Google::Protobuf::MessageExts
1152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1153
+ end
1154
+ end
1155
+ end
1156
+ end
1024
1157
  end
1025
1158
  end
1026
1159
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dialogflow-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-08 00:00:00.000000000 Z
11
+ date: 2024-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -168,6 +168,17 @@ files:
168
168
  - lib/google/cloud/dialogflow/v2/documents/rest/client.rb
169
169
  - lib/google/cloud/dialogflow/v2/documents/rest/operations.rb
170
170
  - lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb
171
+ - lib/google/cloud/dialogflow/v2/encryption_spec_pb.rb
172
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service.rb
173
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb
174
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb
175
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb
176
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb
177
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb
178
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb
179
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb
180
+ - lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb
181
+ - lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb
171
182
  - lib/google/cloud/dialogflow/v2/entity_type_pb.rb
172
183
  - lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb
173
184
  - lib/google/cloud/dialogflow/v2/entity_types.rb
@@ -198,6 +209,15 @@ files:
198
209
  - lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb
199
210
  - lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb
200
211
  - lib/google/cloud/dialogflow/v2/gcs_pb.rb
212
+ - lib/google/cloud/dialogflow/v2/generator_pb.rb
213
+ - lib/google/cloud/dialogflow/v2/generator_services_pb.rb
214
+ - lib/google/cloud/dialogflow/v2/generators.rb
215
+ - lib/google/cloud/dialogflow/v2/generators/client.rb
216
+ - lib/google/cloud/dialogflow/v2/generators/credentials.rb
217
+ - lib/google/cloud/dialogflow/v2/generators/paths.rb
218
+ - lib/google/cloud/dialogflow/v2/generators/rest.rb
219
+ - lib/google/cloud/dialogflow/v2/generators/rest/client.rb
220
+ - lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb
201
221
  - lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb
202
222
  - lib/google/cloud/dialogflow/v2/intent_pb.rb
203
223
  - lib/google/cloud/dialogflow/v2/intent_services_pb.rb
@@ -274,10 +294,12 @@ files:
274
294
  - proto_docs/google/cloud/dialogflow/v2/conversation_model.rb
275
295
  - proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb
276
296
  - proto_docs/google/cloud/dialogflow/v2/document.rb
297
+ - proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb
277
298
  - proto_docs/google/cloud/dialogflow/v2/entity_type.rb
278
299
  - proto_docs/google/cloud/dialogflow/v2/environment.rb
279
300
  - proto_docs/google/cloud/dialogflow/v2/fulfillment.rb
280
301
  - proto_docs/google/cloud/dialogflow/v2/gcs.rb
302
+ - proto_docs/google/cloud/dialogflow/v2/generator.rb
281
303
  - proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb
282
304
  - proto_docs/google/cloud/dialogflow/v2/intent.rb
283
305
  - proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb