google-cloud-dialogflow-v2 0.30.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/lib/google/cloud/dialogflow/v2/agents/client.rb +33 -8
  4. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +28 -6
  5. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +35 -7
  6. data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +33 -8
  7. data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +14 -2
  8. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +32 -8
  9. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +34 -7
  10. data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +14 -2
  11. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +32 -8
  12. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +34 -7
  13. data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +14 -2
  14. data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +33 -8
  15. data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +28 -6
  16. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +35 -7
  17. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +33 -8
  18. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +14 -2
  19. data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +33 -8
  20. data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +28 -6
  21. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +35 -7
  22. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +33 -8
  23. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +14 -2
  24. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +3 -1
  26. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +33 -8
  27. data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +28 -6
  28. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +35 -7
  29. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +33 -8
  30. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +14 -2
  31. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +32 -8
  32. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +34 -7
  33. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +14 -2
  34. data/lib/google/cloud/dialogflow/v2/documents/client.rb +33 -8
  35. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +28 -6
  36. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +35 -7
  37. data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +33 -8
  38. data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +14 -2
  39. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +33 -8
  40. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +28 -6
  41. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +35 -7
  42. data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +33 -8
  43. data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +14 -2
  44. data/lib/google/cloud/dialogflow/v2/environments/client.rb +32 -8
  45. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +34 -7
  46. data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +14 -2
  47. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +32 -8
  48. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +34 -7
  49. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +14 -2
  50. data/lib/google/cloud/dialogflow/v2/intents/client.rb +33 -8
  51. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +28 -6
  52. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +35 -7
  53. data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +33 -8
  54. data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +14 -2
  55. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +32 -8
  56. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +34 -7
  57. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +14 -2
  58. data/lib/google/cloud/dialogflow/v2/participants/client.rb +32 -8
  59. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +34 -7
  60. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +14 -2
  61. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +32 -8
  62. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +34 -7
  63. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +14 -2
  64. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +32 -8
  65. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +34 -7
  66. data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +14 -2
  67. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  68. data/lib/google/cloud/dialogflow/v2/versions/client.rb +32 -8
  69. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +34 -7
  70. data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +14 -2
  71. data/proto_docs/google/api/client.rb +14 -0
  72. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +1 -0
  73. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +1 -0
  74. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +22 -20
  75. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +7 -1
  76. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +62 -3
  77. data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +1 -0
  78. data/proto_docs/google/cloud/dialogflow/v2/session.rb +1 -0
  79. metadata +7 -7
@@ -30,16 +30,28 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: true,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
43
55
  ##
44
56
  # Baseline implementation for the list_versions REST call
45
57
  #
@@ -21,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -304,6 +305,19 @@ module Google
304
305
  # seconds: 360 # 6 minutes
305
306
  # total_poll_timeout:
306
307
  # seconds: 54000 # 90 minutes
308
+ # @!attribute [rw] auto_populated_fields
309
+ # @return [::Array<::String>]
310
+ # List of top-level fields of the request message, that should be
311
+ # automatically populated by the client libraries based on their
312
+ # (google.api.field_info).format. Currently supported format: UUID4.
313
+ #
314
+ # Example of a YAML configuration:
315
+ #
316
+ # publishing:
317
+ # method_settings:
318
+ # - selector: google.example.v1.ExampleService.CreateExample
319
+ # auto_populated_fields:
320
+ # - request_id
307
321
  class MethodSettings
308
322
  include ::Google::Protobuf::MessageExts
309
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -68,6 +68,7 @@ module Google
68
68
  # @return [::Boolean]
69
69
  # Optional. Determines whether this agent should log conversation queries.
70
70
  # @!attribute [rw] match_mode
71
+ # @deprecated This field is deprecated and may be removed in the next major version update.
71
72
  # @return [::Google::Cloud::Dialogflow::V2::Agent::MatchMode]
72
73
  # Optional. Determines how intents are detected from user queries.
73
74
  # @!attribute [rw] classification_threshold
@@ -75,6 +75,7 @@ module Google
75
75
  # chronological order. Format: `projects/<Project ID>/locations/<Location
76
76
  # ID>`.
77
77
  # @!attribute [rw] filter
78
+ # @deprecated This field is deprecated and may be removed in the next major version update.
78
79
  # @return [::String]
79
80
  # Optional. Filters to restrict results to specific answer records.
80
81
  #
@@ -108,6 +108,7 @@ module Google
108
108
  # offsets. If false or unspecified, Speech doesn't return any word-level
109
109
  # information.
110
110
  # @!attribute [rw] phrase_hints
111
+ # @deprecated This field is deprecated and may be removed in the next major version update.
111
112
  # @return [::Array<::String>]
112
113
  # A list of strings containing words and phrases that the speech
113
114
  # recognizer should recognize with higher likelihood.
@@ -128,23 +129,9 @@ module Google
128
129
  # for more details.
129
130
  # @!attribute [rw] model
130
131
  # @return [::String]
131
- # Which Speech model to select for the given request. Select the
132
- # model best suited to your domain to get best results. If a model is not
133
- # explicitly specified, then we auto-select a model based on the parameters
134
- # in the InputAudioConfig.
135
- # If enhanced speech model is enabled for the agent and an enhanced
136
- # version of the specified model for the language does not exist, then the
137
- # speech is recognized using the standard version of the specified model.
138
- # Refer to
139
- # [Cloud Speech API
140
- # documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
141
- # for more details.
142
- # If you specify a model, the following models typically have the best
143
- # performance:
144
- #
145
- # - phone_call (best for Agent Assist and telephony)
146
- # - latest_short (best for Dialogflow non-telephony)
147
- # - command_and_search (best for very short utterances and commands)
132
+ # Optional. Which Speech model to select for the given request.
133
+ # For more information, see
134
+ # [Speech models](https://cloud.google.com/dialogflow/es/docs/speech-models).
148
135
  # @!attribute [rw] model_variant
149
136
  # @return [::Google::Cloud::Dialogflow::V2::SpeechModelVariant]
150
137
  # Which variant of the [Speech
@@ -276,13 +263,28 @@ module Google
276
263
  # error.
277
264
  # @!attribute [rw] model
278
265
  # @return [::String]
279
- # Which Speech model to select. Select the model best suited to your domain
280
- # to get best results. If a model is not explicitly specified, then a default
281
- # model is used.
266
+ # Which Speech model to select. Select the
267
+ # model best suited to your domain to get best results. If a model is not
268
+ # explicitly specified, then Dialogflow auto-selects a model based on other
269
+ # parameters in the SpeechToTextConfig and Agent settings.
270
+ # If enhanced speech model is enabled for the agent and an enhanced
271
+ # version of the specified model for the language does not exist, then the
272
+ # speech is recognized using the standard version of the specified model.
282
273
  # Refer to
283
274
  # [Cloud Speech API
284
275
  # documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
285
276
  # for more details.
277
+ # If you specify a model, the following models typically have the best
278
+ # performance:
279
+ #
280
+ # - phone_call (best for Agent Assist and telephony)
281
+ # - latest_short (best for Dialogflow non-telephony)
282
+ # - command_and_search
283
+ #
284
+ # Leave this field unspecified to use
285
+ # [Agent Speech
286
+ # settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
287
+ # for model selection.
286
288
  # @!attribute [rw] use_timeout_based_endpointing
287
289
  # @return [::Boolean]
288
290
  # Use timeout based endpointing, interpreting endpointer sensitivy as
@@ -479,6 +479,9 @@ module Google
479
479
  # @return [::Array<::Google::Cloud::Dialogflow::V2::SearchKnowledgeAnswer>]
480
480
  # Most relevant snippets extracted from articles in the given knowledge base,
481
481
  # ordered by confidence.
482
+ # @!attribute [rw] rewritten_query
483
+ # @return [::String]
484
+ # The rewritten query used to search knowledge.
482
485
  class SearchKnowledgeResponse
483
486
  include ::Google::Protobuf::MessageExts
484
487
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -524,11 +527,14 @@ module Google
524
527
  # The answer has a unspecified type.
525
528
  ANSWER_TYPE_UNSPECIFIED = 0
526
529
 
527
- # The answer is from FAQ doucments.
530
+ # The answer is from FAQ documents.
528
531
  FAQ = 1
529
532
 
530
533
  # The answer is from generative model.
531
534
  GENERATIVE = 2
535
+
536
+ # The answer is from intent matching.
537
+ INTENT = 3
532
538
  end
533
539
  end
534
540
  end
@@ -198,10 +198,10 @@ module Google
198
198
  # is used.
199
199
  # @!attribute [rw] session_ttl
200
200
  # @return [::Google::Protobuf::Duration]
201
- # Optional. Sets Dialogflow CX session life time.
201
+ # Optional. Configure lifetime of the Dialogflow session.
202
202
  # By default, a Dialogflow CX session remains active and its data is stored
203
- # for 30 minutes after the last request is sent for the session. This value
204
- # should be no longer than 1 day.
203
+ # for 30 minutes after the last request is sent for the session.
204
+ # This value should be no longer than 1 day.
205
205
  class AutomatedAgentConfig
206
206
  include ::Google::Protobuf::MessageExts
207
207
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -257,6 +257,10 @@ module Google
257
257
  # can prevent those queries from being stored at answer records.
258
258
  #
259
259
  # Supported features: KNOWLEDGE_SEARCH.
260
+ # @!attribute [rw] enable_conversation_augmented_query
261
+ # @return [::Boolean]
262
+ # Optional. Enable including conversation context during query answer
263
+ # generation. Supported features: KNOWLEDGE_SEARCH.
260
264
  # @!attribute [rw] suggestion_trigger_settings
261
265
  # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionTriggerSettings]
262
266
  # Settings of suggestion trigger.
@@ -340,6 +344,10 @@ module Google
340
344
  # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::ContextFilterSettings]
341
345
  # Determines how recent conversation context is filtered when generating
342
346
  # suggestions. If unspecified, no messages will be dropped.
347
+ # @!attribute [rw] sections
348
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::Sections]
349
+ # Optional. The customized sections chosen to return when requesting a
350
+ # summary of a conversation.
343
351
  class SuggestionQueryConfig
344
352
  include ::Google::Protobuf::MessageExts
345
353
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -417,6 +425,57 @@ module Google
417
425
  include ::Google::Protobuf::MessageExts
418
426
  extend ::Google::Protobuf::MessageExts::ClassMethods
419
427
  end
428
+
429
+ # Custom sections to return when requesting a summary of a conversation.
430
+ # This is only supported when `baseline_model_version` == '2.0'.
431
+ #
432
+ # Supported features: CONVERSATION_SUMMARIZATION,
433
+ # CONVERSATION_SUMMARIZATION_VOICE.
434
+ # @!attribute [rw] section_types
435
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::Sections::SectionType>]
436
+ # The selected sections chosen to return when requesting a summary of a
437
+ # conversation. A duplicate selected section will be treated as a single
438
+ # selected section. If section types are not provided, the default will
439
+ # be \\{SITUATION, ACTION, RESULT}.
440
+ class Sections
441
+ include ::Google::Protobuf::MessageExts
442
+ extend ::Google::Protobuf::MessageExts::ClassMethods
443
+
444
+ # Selectable sections to return when requesting a summary of a
445
+ # conversation.
446
+ module SectionType
447
+ # Undefined section type, does not return anything.
448
+ SECTION_TYPE_UNSPECIFIED = 0
449
+
450
+ # What the customer needs help with or has question about.
451
+ # Section name: "situation".
452
+ SITUATION = 1
453
+
454
+ # What the agent does to help the customer.
455
+ # Section name: "action".
456
+ ACTION = 2
457
+
458
+ # Result of the customer service. A single word describing the result
459
+ # of the conversation.
460
+ # Section name: "resolution".
461
+ RESOLUTION = 3
462
+
463
+ # Reason for cancellation if the customer requests for a cancellation.
464
+ # "N/A" otherwise.
465
+ # Section name: "reason_for_cancellation".
466
+ REASON_FOR_CANCELLATION = 4
467
+
468
+ # "Unsatisfied" or "Satisfied" depending on the customer's feelings at
469
+ # the end of the conversation.
470
+ # Section name: "customer_satisfaction".
471
+ CUSTOMER_SATISFACTION = 5
472
+
473
+ # Key entities extracted from the conversation, such as ticket number,
474
+ # order number, dollar amount, etc.
475
+ # Section names are prefixed by "entities/".
476
+ ENTITIES = 6
477
+ end
478
+ end
420
479
  end
421
480
 
422
481
  # Custom conversation models used in agent assist feature.
@@ -83,6 +83,7 @@ module Google
83
83
  # Optional. The HTTP request headers to send together with fulfillment
84
84
  # requests.
85
85
  # @!attribute [rw] is_cloud_function
86
+ # @deprecated This field is deprecated and may be removed in the next major version update.
86
87
  # @return [::Boolean]
87
88
  # Optional. Indicates if generic web service is created through Cloud
88
89
  # Functions integration. Defaults to false.
@@ -382,6 +382,7 @@ module Google
382
382
  #
383
383
  # 3. an event that specifies which intent to trigger.
384
384
  # @!attribute [rw] single_utterance
385
+ # @deprecated This field is deprecated and may be removed in the next major version update.
385
386
  # @return [::Boolean]
386
387
  # Please use
387
388
  # {::Google::Cloud::Dialogflow::V2::InputAudioConfig#single_utterance InputAudioConfig.single_utterance}
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: 0.30.0
4
+ version: 0.32.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: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.20.0
19
+ version: 0.21.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.20.0
29
+ version: 0.21.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.4'
53
+ version: '0.7'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.a
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0.4'
63
+ version: '0.7'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
@@ -427,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
427
427
  - !ruby/object:Gem::Version
428
428
  version: '0'
429
429
  requirements: []
430
- rubygems_version: 3.4.19
430
+ rubygems_version: 3.5.3
431
431
  signing_key:
432
432
  specification_version: 4
433
433
  summary: Builds conversational interfaces (for example, chatbots, and voice-powered