google-cloud-dialogflow-cx-v3 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +119 -119
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +112 -112
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +50 -50
- data/lib/google/cloud/dialogflow/cx/v3/generator_pb.rb +60 -0
- data/lib/google/cloud/dialogflow/cx/v3/generator_services_pb.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +827 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/paths.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +771 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators.rb +57 -0
- data/lib/google/cloud/dialogflow/cx/v3/rest.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +12 -1
- data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +101 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb +45 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +94 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +60 -0
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3.rb +1 -0
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +15 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +47 -3
- data/proto_docs/google/cloud/dialogflow/cx/v3/generator.rb +187 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +185 -0
- metadata +13 -3
@@ -571,6 +571,100 @@ module Google
|
|
571
571
|
raise ::Google::Cloud::Error.from_error(e)
|
572
572
|
end
|
573
573
|
|
574
|
+
##
|
575
|
+
# Updates the feedback received from the user for a single turn of the bot
|
576
|
+
# response.
|
577
|
+
#
|
578
|
+
# @overload submit_answer_feedback(request, options = nil)
|
579
|
+
# Pass arguments to `submit_answer_feedback` via a request object, either of type
|
580
|
+
# {::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest} or an equivalent Hash.
|
581
|
+
#
|
582
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest, ::Hash]
|
583
|
+
# A request object representing the call parameters. Required. To specify no
|
584
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
585
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
586
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
587
|
+
#
|
588
|
+
# @overload submit_answer_feedback(session: nil, response_id: nil, answer_feedback: nil, update_mask: nil)
|
589
|
+
# Pass arguments to `submit_answer_feedback` via keyword arguments. Note that at
|
590
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
591
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
592
|
+
#
|
593
|
+
# @param session [::String]
|
594
|
+
# Required. The name of the session the feedback was sent to.
|
595
|
+
# @param response_id [::String]
|
596
|
+
# Required. ID of the response to update its feedback. This is the same as
|
597
|
+
# DetectIntentResponse.response_id.
|
598
|
+
# @param answer_feedback [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback, ::Hash]
|
599
|
+
# Required. Feedback provided for a bot answer.
|
600
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
601
|
+
# Optional. The mask to control which fields to update. If the mask is not
|
602
|
+
# present, all fields will be updated.
|
603
|
+
#
|
604
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
605
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
606
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
607
|
+
#
|
608
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
609
|
+
#
|
610
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
611
|
+
#
|
612
|
+
# @example Basic example
|
613
|
+
# require "google/cloud/dialogflow/cx/v3"
|
614
|
+
#
|
615
|
+
# # Create a client object. The client can be reused for multiple calls.
|
616
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new
|
617
|
+
#
|
618
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
619
|
+
# request = Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest.new
|
620
|
+
#
|
621
|
+
# # Call the submit_answer_feedback method.
|
622
|
+
# result = client.submit_answer_feedback request
|
623
|
+
#
|
624
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AnswerFeedback.
|
625
|
+
# p result
|
626
|
+
#
|
627
|
+
def submit_answer_feedback request, options = nil
|
628
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
629
|
+
|
630
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest
|
631
|
+
|
632
|
+
# Converts hash and nil to an options object
|
633
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
634
|
+
|
635
|
+
# Customize the options with defaults
|
636
|
+
metadata = @config.rpcs.submit_answer_feedback.metadata.to_h
|
637
|
+
|
638
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
639
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
640
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
641
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
|
642
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
643
|
+
|
644
|
+
header_params = {}
|
645
|
+
if request.session
|
646
|
+
header_params["session"] = request.session
|
647
|
+
end
|
648
|
+
|
649
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
650
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
651
|
+
|
652
|
+
options.apply_defaults timeout: @config.rpcs.submit_answer_feedback.timeout,
|
653
|
+
metadata: metadata,
|
654
|
+
retry_policy: @config.rpcs.submit_answer_feedback.retry_policy
|
655
|
+
|
656
|
+
options.apply_defaults timeout: @config.timeout,
|
657
|
+
metadata: @config.metadata,
|
658
|
+
retry_policy: @config.retry_policy
|
659
|
+
|
660
|
+
@sessions_stub.call_rpc :submit_answer_feedback, request, options: options do |response, operation|
|
661
|
+
yield response, operation if block_given?
|
662
|
+
return response
|
663
|
+
end
|
664
|
+
rescue ::GRPC::BadStatus => e
|
665
|
+
raise ::Google::Cloud::Error.from_error(e)
|
666
|
+
end
|
667
|
+
|
574
668
|
##
|
575
669
|
# Configuration class for the Sessions API.
|
576
670
|
#
|
@@ -736,6 +830,11 @@ module Google
|
|
736
830
|
# @return [::Gapic::Config::Method]
|
737
831
|
#
|
738
832
|
attr_reader :fulfill_intent
|
833
|
+
##
|
834
|
+
# RPC-specific configuration for `submit_answer_feedback`
|
835
|
+
# @return [::Gapic::Config::Method]
|
836
|
+
#
|
837
|
+
attr_reader :submit_answer_feedback
|
739
838
|
|
740
839
|
# @private
|
741
840
|
def initialize parent_rpcs = nil
|
@@ -747,6 +846,8 @@ module Google
|
|
747
846
|
@match_intent = ::Gapic::Config::Method.new match_intent_config
|
748
847
|
fulfill_intent_config = parent_rpcs.fulfill_intent if parent_rpcs.respond_to? :fulfill_intent
|
749
848
|
@fulfill_intent = ::Gapic::Config::Method.new fulfill_intent_config
|
849
|
+
submit_answer_feedback_config = parent_rpcs.submit_answer_feedback if parent_rpcs.respond_to? :submit_answer_feedback
|
850
|
+
@submit_answer_feedback = ::Gapic::Config::Method.new submit_answer_feedback_config
|
750
851
|
|
751
852
|
yield self if block_given?
|
752
853
|
end
|
@@ -25,6 +25,51 @@ module Google
|
|
25
25
|
module Sessions
|
26
26
|
# Path helper methods for the Sessions API.
|
27
27
|
module Paths
|
28
|
+
##
|
29
|
+
# Create a fully-qualified DataStore resource string.
|
30
|
+
#
|
31
|
+
# @overload data_store_path(project:, location:, data_store:)
|
32
|
+
# The resource will be in the following format:
|
33
|
+
#
|
34
|
+
# `projects/{project}/locations/{location}/dataStores/{data_store}`
|
35
|
+
#
|
36
|
+
# @param project [String]
|
37
|
+
# @param location [String]
|
38
|
+
# @param data_store [String]
|
39
|
+
#
|
40
|
+
# @overload data_store_path(project:, location:, collection:, data_store:)
|
41
|
+
# The resource will be in the following format:
|
42
|
+
#
|
43
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
|
44
|
+
#
|
45
|
+
# @param project [String]
|
46
|
+
# @param location [String]
|
47
|
+
# @param collection [String]
|
48
|
+
# @param data_store [String]
|
49
|
+
#
|
50
|
+
# @return [::String]
|
51
|
+
def data_store_path **args
|
52
|
+
resources = {
|
53
|
+
"data_store:location:project" => (proc do |project:, location:, data_store:|
|
54
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
55
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
56
|
+
|
57
|
+
"projects/#{project}/locations/#{location}/dataStores/#{data_store}"
|
58
|
+
end),
|
59
|
+
"collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
|
60
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
61
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
63
|
+
|
64
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}"
|
65
|
+
end)
|
66
|
+
}
|
67
|
+
|
68
|
+
resource = resources[args.keys.sort.join(":")]
|
69
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
70
|
+
resource.call(**args)
|
71
|
+
end
|
72
|
+
|
28
73
|
##
|
29
74
|
# Create a fully-qualified EntityType resource string.
|
30
75
|
#
|
@@ -455,6 +455,93 @@ module Google
|
|
455
455
|
raise ::Google::Cloud::Error.from_error(e)
|
456
456
|
end
|
457
457
|
|
458
|
+
##
|
459
|
+
# Updates the feedback received from the user for a single turn of the bot
|
460
|
+
# response.
|
461
|
+
#
|
462
|
+
# @overload submit_answer_feedback(request, options = nil)
|
463
|
+
# Pass arguments to `submit_answer_feedback` via a request object, either of type
|
464
|
+
# {::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest} or an equivalent Hash.
|
465
|
+
#
|
466
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest, ::Hash]
|
467
|
+
# A request object representing the call parameters. Required. To specify no
|
468
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
469
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
470
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
471
|
+
#
|
472
|
+
# @overload submit_answer_feedback(session: nil, response_id: nil, answer_feedback: nil, update_mask: nil)
|
473
|
+
# Pass arguments to `submit_answer_feedback` via keyword arguments. Note that at
|
474
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
475
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
476
|
+
#
|
477
|
+
# @param session [::String]
|
478
|
+
# Required. The name of the session the feedback was sent to.
|
479
|
+
# @param response_id [::String]
|
480
|
+
# Required. ID of the response to update its feedback. This is the same as
|
481
|
+
# DetectIntentResponse.response_id.
|
482
|
+
# @param answer_feedback [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback, ::Hash]
|
483
|
+
# Required. Feedback provided for a bot answer.
|
484
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
485
|
+
# Optional. The mask to control which fields to update. If the mask is not
|
486
|
+
# present, all fields will be updated.
|
487
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
488
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
489
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
490
|
+
#
|
491
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
492
|
+
#
|
493
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
494
|
+
#
|
495
|
+
# @example Basic example
|
496
|
+
# require "google/cloud/dialogflow/cx/v3"
|
497
|
+
#
|
498
|
+
# # Create a client object. The client can be reused for multiple calls.
|
499
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Sessions::Rest::Client.new
|
500
|
+
#
|
501
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
502
|
+
# request = Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest.new
|
503
|
+
#
|
504
|
+
# # Call the submit_answer_feedback method.
|
505
|
+
# result = client.submit_answer_feedback request
|
506
|
+
#
|
507
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AnswerFeedback.
|
508
|
+
# p result
|
509
|
+
#
|
510
|
+
def submit_answer_feedback request, options = nil
|
511
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
|
+
|
513
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest
|
514
|
+
|
515
|
+
# Converts hash and nil to an options object
|
516
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
517
|
+
|
518
|
+
# Customize the options with defaults
|
519
|
+
call_metadata = @config.rpcs.submit_answer_feedback.metadata.to_h
|
520
|
+
|
521
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
522
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
523
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
524
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
|
525
|
+
transports_version_send: [:rest]
|
526
|
+
|
527
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
528
|
+
|
529
|
+
options.apply_defaults timeout: @config.rpcs.submit_answer_feedback.timeout,
|
530
|
+
metadata: call_metadata,
|
531
|
+
retry_policy: @config.rpcs.submit_answer_feedback.retry_policy
|
532
|
+
|
533
|
+
options.apply_defaults timeout: @config.timeout,
|
534
|
+
metadata: @config.metadata,
|
535
|
+
retry_policy: @config.retry_policy
|
536
|
+
|
537
|
+
@sessions_stub.submit_answer_feedback request, options do |result, operation|
|
538
|
+
yield result, operation if block_given?
|
539
|
+
return result
|
540
|
+
end
|
541
|
+
rescue ::Gapic::Rest::Error => e
|
542
|
+
raise ::Google::Cloud::Error.from_error(e)
|
543
|
+
end
|
544
|
+
|
458
545
|
##
|
459
546
|
# Configuration class for the Sessions REST API.
|
460
547
|
#
|
@@ -602,6 +689,11 @@ module Google
|
|
602
689
|
# @return [::Gapic::Config::Method]
|
603
690
|
#
|
604
691
|
attr_reader :fulfill_intent
|
692
|
+
##
|
693
|
+
# RPC-specific configuration for `submit_answer_feedback`
|
694
|
+
# @return [::Gapic::Config::Method]
|
695
|
+
#
|
696
|
+
attr_reader :submit_answer_feedback
|
605
697
|
|
606
698
|
# @private
|
607
699
|
def initialize parent_rpcs = nil
|
@@ -611,6 +703,8 @@ module Google
|
|
611
703
|
@match_intent = ::Gapic::Config::Method.new match_intent_config
|
612
704
|
fulfill_intent_config = parent_rpcs.fulfill_intent if parent_rpcs.respond_to? :fulfill_intent
|
613
705
|
@fulfill_intent = ::Gapic::Config::Method.new fulfill_intent_config
|
706
|
+
submit_answer_feedback_config = parent_rpcs.submit_answer_feedback if parent_rpcs.respond_to? :submit_answer_feedback
|
707
|
+
@submit_answer_feedback = ::Gapic::Config::Method.new submit_answer_feedback_config
|
614
708
|
|
615
709
|
yield self if block_given?
|
616
710
|
end
|
@@ -155,6 +155,44 @@ module Google
|
|
155
155
|
result
|
156
156
|
end
|
157
157
|
|
158
|
+
##
|
159
|
+
# Baseline implementation for the submit_answer_feedback REST call
|
160
|
+
#
|
161
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest]
|
162
|
+
# A request object representing the call parameters. Required.
|
163
|
+
# @param options [::Gapic::CallOptions]
|
164
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
165
|
+
#
|
166
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
167
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
168
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
169
|
+
#
|
170
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback]
|
171
|
+
# A result object deserialized from the server's reply
|
172
|
+
def submit_answer_feedback request_pb, options = nil
|
173
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
174
|
+
|
175
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_submit_answer_feedback_request request_pb
|
176
|
+
query_string_params = if query_string_params.any?
|
177
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
178
|
+
else
|
179
|
+
{}
|
180
|
+
end
|
181
|
+
|
182
|
+
response = @client_stub.make_http_request(
|
183
|
+
verb,
|
184
|
+
uri: uri,
|
185
|
+
body: body || "",
|
186
|
+
params: query_string_params,
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback.decode_json response.body, ignore_unknown_fields: true
|
191
|
+
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
195
|
+
|
158
196
|
##
|
159
197
|
# @private
|
160
198
|
#
|
@@ -244,6 +282,28 @@ module Google
|
|
244
282
|
)
|
245
283
|
transcoder.transcode request_pb
|
246
284
|
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# @private
|
288
|
+
#
|
289
|
+
# GRPC transcoding helper method for the submit_answer_feedback REST call
|
290
|
+
#
|
291
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::SubmitAnswerFeedbackRequest]
|
292
|
+
# A request object representing the call parameters. Required.
|
293
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
294
|
+
# Uri, Body, Query string parameters
|
295
|
+
def self.transcode_submit_answer_feedback_request request_pb
|
296
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
297
|
+
.with_bindings(
|
298
|
+
uri_method: :post,
|
299
|
+
uri_template: "/v3/{session}:submitAnswerFeedback",
|
300
|
+
body: "*",
|
301
|
+
matches: [
|
302
|
+
["session", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/sessions/[^/]+/?$}, false]
|
303
|
+
]
|
304
|
+
)
|
305
|
+
transcoder.transcode request_pb
|
306
|
+
end
|
247
307
|
end
|
248
308
|
end
|
249
309
|
end
|
@@ -30,6 +30,7 @@ require "google/cloud/dialogflow/cx/v3/test_cases"
|
|
30
30
|
require "google/cloud/dialogflow/cx/v3/webhooks"
|
31
31
|
require "google/cloud/dialogflow/cx/v3/environments"
|
32
32
|
require "google/cloud/dialogflow/cx/v3/experiments"
|
33
|
+
require "google/cloud/dialogflow/cx/v3/generators"
|
33
34
|
require "google/cloud/dialogflow/cx/v3/security_settings_service"
|
34
35
|
require "google/cloud/dialogflow/cx/v3/versions"
|
35
36
|
require "google/cloud/dialogflow/cx/v3/version"
|
@@ -304,6 +304,19 @@ module Google
|
|
304
304
|
# seconds: 360 # 6 minutes
|
305
305
|
# total_poll_timeout:
|
306
306
|
# seconds: 54000 # 90 minutes
|
307
|
+
# @!attribute [rw] auto_populated_fields
|
308
|
+
# @return [::Array<::String>]
|
309
|
+
# List of top-level fields of the request message, that should be
|
310
|
+
# automatically populated by the client libraries based on their
|
311
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
312
|
+
#
|
313
|
+
# Example of a YAML configuration:
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# method_settings:
|
317
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
318
|
+
# auto_populated_fields:
|
319
|
+
# - request_id
|
307
320
|
class MethodSettings
|
308
321
|
include ::Google::Protobuf::MessageExts
|
309
322
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -127,6 +127,9 @@ module Google
|
|
127
127
|
# @!attribute [rw] gen_app_builder_settings
|
128
128
|
# @return [::Google::Cloud::Dialogflow::CX::V3::Agent::GenAppBuilderSettings]
|
129
129
|
# Gen App Builder-related agent-level settings.
|
130
|
+
# @!attribute [rw] answer_feedback_settings
|
131
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Agent::AnswerFeedbackSettings]
|
132
|
+
# Optional. Answer feedback collection settings.
|
130
133
|
class Agent
|
131
134
|
include ::Google::Protobuf::MessageExts
|
132
135
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -172,6 +175,18 @@ module Google
|
|
172
175
|
include ::Google::Protobuf::MessageExts
|
173
176
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
174
177
|
end
|
178
|
+
|
179
|
+
# Settings for answer feedback collection.
|
180
|
+
# @!attribute [rw] enable_answer_feedback
|
181
|
+
# @return [::Boolean]
|
182
|
+
# Optional. If enabled, end users will be able to provide
|
183
|
+
# {::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback answer feedback} to
|
184
|
+
# Dialogflow responses. Feature works only if interaction logging is
|
185
|
+
# enabled in the Dialogflow agent.
|
186
|
+
class AnswerFeedbackSettings
|
187
|
+
include ::Google::Protobuf::MessageExts
|
188
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
189
|
+
end
|
175
190
|
end
|
176
191
|
|
177
192
|
# The request message for
|
@@ -50,6 +50,42 @@ module Google
|
|
50
50
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
51
51
|
end
|
52
52
|
|
53
|
+
# Configuration of the barge-in behavior. Barge-in instructs the API to return
|
54
|
+
# a detected utterance at a proper time while the client is playing back the
|
55
|
+
# response audio from a previous request. When the client sees the
|
56
|
+
# utterance, it should stop the playback and immediately get ready for
|
57
|
+
# receiving the responses for the current request.
|
58
|
+
#
|
59
|
+
# The barge-in handling requires the client to start streaming audio input
|
60
|
+
# as soon as it starts playing back the audio from the previous response. The
|
61
|
+
# playback is modeled into two phases:
|
62
|
+
#
|
63
|
+
# * No barge-in phase: which goes first and during which speech detection
|
64
|
+
# should not be carried out.
|
65
|
+
#
|
66
|
+
# * Barge-in phase: which follows the no barge-in phase and during which
|
67
|
+
# the API starts speech detection and may inform the client that an utterance
|
68
|
+
# has been detected. Note that no-speech event is not expected in this
|
69
|
+
# phase.
|
70
|
+
#
|
71
|
+
# The client provides this configuration in terms of the durations of those
|
72
|
+
# two phases. The durations are measured in terms of the audio length from the
|
73
|
+
# the start of the input audio.
|
74
|
+
#
|
75
|
+
# No-speech event is a response with END_OF_UTTERANCE without any transcript
|
76
|
+
# following up.
|
77
|
+
# @!attribute [rw] no_barge_in_duration
|
78
|
+
# @return [::Google::Protobuf::Duration]
|
79
|
+
# Duration that is not eligible for barge-in at the beginning of the input
|
80
|
+
# audio.
|
81
|
+
# @!attribute [rw] total_duration
|
82
|
+
# @return [::Google::Protobuf::Duration]
|
83
|
+
# Total duration for the playback at the beginning of the input audio.
|
84
|
+
class BargeInConfig
|
85
|
+
include ::Google::Protobuf::MessageExts
|
86
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
87
|
+
end
|
88
|
+
|
53
89
|
# Instructs the speech recognizer on how to process the audio content.
|
54
90
|
# @!attribute [rw] audio_encoding
|
55
91
|
# @return [::Google::Cloud::Dialogflow::CX::V3::AudioEncoding]
|
@@ -81,8 +117,8 @@ module Google
|
|
81
117
|
# @return [::String]
|
82
118
|
# Optional. Which Speech model to select for the given request. Select the
|
83
119
|
# model best suited to your domain to get best results. If a model is not
|
84
|
-
# explicitly specified, then
|
85
|
-
# in the InputAudioConfig.
|
120
|
+
# explicitly specified, then Dialogflow auto-selects a model based on other
|
121
|
+
# parameters in the InputAudioConfig and Agent settings.
|
86
122
|
# If enhanced speech model is enabled for the agent and an enhanced
|
87
123
|
# version of the specified model for the language does not exist, then the
|
88
124
|
# speech is recognized using the standard version of the specified model.
|
@@ -95,7 +131,12 @@ module Google
|
|
95
131
|
#
|
96
132
|
# - phone_call (best for Agent Assist and telephony)
|
97
133
|
# - latest_short (best for Dialogflow non-telephony)
|
98
|
-
# - command_and_search
|
134
|
+
# - command_and_search
|
135
|
+
#
|
136
|
+
# Leave this field unspecified to use
|
137
|
+
# [Agent Speech
|
138
|
+
# settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
|
139
|
+
# for model selection.
|
99
140
|
# @!attribute [rw] model_variant
|
100
141
|
# @return [::Google::Cloud::Dialogflow::CX::V3::SpeechModelVariant]
|
101
142
|
# Optional. Which variant of the [Speech
|
@@ -110,6 +151,9 @@ module Google
|
|
110
151
|
# client should close the stream and start a new request with a new stream as
|
111
152
|
# needed.
|
112
153
|
# Note: This setting is relevant only for streaming methods.
|
154
|
+
# @!attribute [rw] barge_in_config
|
155
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::BargeInConfig]
|
156
|
+
# Configuration of barge-in behavior during the streaming of input audio.
|
113
157
|
class InputAudioConfig
|
114
158
|
include ::Google::Protobuf::MessageExts
|
115
159
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|