google-cloud-dialogflow-cx-v3 0.21.0 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +2 -1
- 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/flow_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +3 -1
- 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/inline_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +13 -1
- data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +22 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +268 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +781 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +254 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +892 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +120 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/cx/v3/rest.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +14 -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/advanced_settings.rb +28 -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/flow.rb +4 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +11 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/generator.rb +187 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/inline.rb +49 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +175 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +8 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +192 -0
- metadata +17 -3
@@ -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
|
@@ -40,6 +40,14 @@ module Google
|
|
40
40
|
# Exposed at the following levels:
|
41
41
|
# - Agent level
|
42
42
|
# - Flow level
|
43
|
+
# @!attribute [rw] dtmf_settings
|
44
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings::DtmfSettings]
|
45
|
+
# Settings for DTMF.
|
46
|
+
# Exposed at the following levels:
|
47
|
+
# - Agent level
|
48
|
+
# - Flow level
|
49
|
+
# - Page level
|
50
|
+
# - Parameter level.
|
43
51
|
# @!attribute [rw] logging_settings
|
44
52
|
# @return [::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings::LoggingSettings]
|
45
53
|
# Settings for logging.
|
@@ -51,6 +59,26 @@ module Google
|
|
51
59
|
include ::Google::Protobuf::MessageExts
|
52
60
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
61
|
|
62
|
+
# Define behaviors for DTMF (dual tone multi frequency).
|
63
|
+
# @!attribute [rw] enabled
|
64
|
+
# @return [::Boolean]
|
65
|
+
# If true, incoming audio is processed for DTMF (dual tone multi frequency)
|
66
|
+
# events. For example, if the caller presses a button on their telephone
|
67
|
+
# keypad and DTMF processing is enabled, Dialogflow will detect the
|
68
|
+
# event (e.g. a "3" was pressed) in the incoming audio and pass the event
|
69
|
+
# to the bot to drive business logic (e.g. when 3 is pressed, return the
|
70
|
+
# account balance).
|
71
|
+
# @!attribute [rw] max_digits
|
72
|
+
# @return [::Integer]
|
73
|
+
# Max length of DTMF digits.
|
74
|
+
# @!attribute [rw] finish_digit
|
75
|
+
# @return [::String]
|
76
|
+
# The digit that terminates a DTMF digit sequence.
|
77
|
+
class DtmfSettings
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
end
|
81
|
+
|
54
82
|
# Define behaviors on logging.
|
55
83
|
# @!attribute [rw] enable_stackdriver_logging
|
56
84
|
# @return [::Boolean]
|
@@ -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
|
@@ -145,6 +145,10 @@ module Google
|
|
145
145
|
# @!attribute [rw] nlu_settings
|
146
146
|
# @return [::Google::Cloud::Dialogflow::CX::V3::NluSettings]
|
147
147
|
# NLU related settings of the flow.
|
148
|
+
# @!attribute [rw] advanced_settings
|
149
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings]
|
150
|
+
# Hierarchical advanced settings for this flow. The settings exposed at the
|
151
|
+
# lower level overrides the settings exposed at the higher level.
|
148
152
|
# @!attribute [rw] knowledge_connector_settings
|
149
153
|
# @return [::Google::Cloud::Dialogflow::CX::V3::KnowledgeConnectorSettings]
|
150
154
|
# Optional. Knowledge connector configuration.
|
@@ -71,6 +71,17 @@ module Google
|
|
71
71
|
# @!attribute [rw] conditional_cases
|
72
72
|
# @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Fulfillment::ConditionalCases>]
|
73
73
|
# Conditional cases for this fulfillment.
|
74
|
+
# @!attribute [rw] advanced_settings
|
75
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings]
|
76
|
+
# Hierarchical advanced settings for this fulfillment. The settings exposed
|
77
|
+
# at the lower level overrides the settings exposed at the higher level.
|
78
|
+
# @!attribute [rw] enable_generative_fallback
|
79
|
+
# @return [::Boolean]
|
80
|
+
# If the flag is true, the agent will utilize LLM to generate a text
|
81
|
+
# response. If LLM generation fails, the defined
|
82
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Fulfillment#messages responses} in the
|
83
|
+
# fulfillment will be respected. This flag is only useful for fulfillments
|
84
|
+
# associated with no-match event handlers.
|
74
85
|
class Fulfillment
|
75
86
|
include ::Google::Protobuf::MessageExts
|
76
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,187 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 CX
|
24
|
+
module V3
|
25
|
+
# Generators contain prompt to be sent to the LLM model to generate text. The
|
26
|
+
# prompt can contain parameters which will be resolved before calling the
|
27
|
+
# model. It can optionally contain banned phrases to ensure the model responses
|
28
|
+
# are safe.
|
29
|
+
# @!attribute [rw] name
|
30
|
+
# @return [::String]
|
31
|
+
# The unique identifier of the generator.
|
32
|
+
# Must be set for the
|
33
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#update_generator Generators.UpdateGenerator}
|
34
|
+
# method. [Generators.CreateGenerate][] populates the name automatically.
|
35
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
36
|
+
# ID>/generators/<Generator ID>`.
|
37
|
+
# @!attribute [rw] display_name
|
38
|
+
# @return [::String]
|
39
|
+
# Required. The human-readable name of the generator, unique within the
|
40
|
+
# agent. The prompt contains pre-defined parameters such as $conversation,
|
41
|
+
# $last-user-utterance, etc. populated by Dialogflow. It can also contain
|
42
|
+
# custom placeholders which will be resolved during fulfillment.
|
43
|
+
# @!attribute [rw] prompt_text
|
44
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Phrase]
|
45
|
+
# Required. Prompt for the LLM model.
|
46
|
+
# @!attribute [rw] placeholders
|
47
|
+
# @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Generator::Placeholder>]
|
48
|
+
# Optional. List of custom placeholders in the prompt text.
|
49
|
+
class Generator
|
50
|
+
include ::Google::Protobuf::MessageExts
|
51
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
52
|
+
|
53
|
+
# Represents a custom placeholder in the prompt text.
|
54
|
+
# @!attribute [rw] id
|
55
|
+
# @return [::String]
|
56
|
+
# Unique ID used to map custom placeholder to parameters in fulfillment.
|
57
|
+
# @!attribute [rw] name
|
58
|
+
# @return [::String]
|
59
|
+
# Custom placeholder value in the prompt text.
|
60
|
+
class Placeholder
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Text input which can be used for prompt or banned phrases.
|
67
|
+
# @!attribute [rw] text
|
68
|
+
# @return [::String]
|
69
|
+
# Required. Text input which can be used for prompt or banned phrases.
|
70
|
+
class Phrase
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
|
75
|
+
# The request message for
|
76
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#list_generators Generators.ListGenerators}.
|
77
|
+
# @!attribute [rw] parent
|
78
|
+
# @return [::String]
|
79
|
+
# Required. The agent to list all generators for.
|
80
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
81
|
+
# @!attribute [rw] language_code
|
82
|
+
# @return [::String]
|
83
|
+
# The language to list generators for.
|
84
|
+
# @!attribute [rw] page_size
|
85
|
+
# @return [::Integer]
|
86
|
+
# The maximum number of items to return in a single page. By default 100 and
|
87
|
+
# at most 1000.
|
88
|
+
# @!attribute [rw] page_token
|
89
|
+
# @return [::String]
|
90
|
+
# The next_page_token value returned from a previous list request.
|
91
|
+
class ListGeneratorsRequest
|
92
|
+
include ::Google::Protobuf::MessageExts
|
93
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
94
|
+
end
|
95
|
+
|
96
|
+
# The response message for
|
97
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#list_generators Generators.ListGenerators}.
|
98
|
+
# @!attribute [rw] generators
|
99
|
+
# @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Generator>]
|
100
|
+
# The list of generators. There will be a maximum number of items returned
|
101
|
+
# based on the page_size field in the request.
|
102
|
+
# @!attribute [rw] next_page_token
|
103
|
+
# @return [::String]
|
104
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
105
|
+
# results in the list.
|
106
|
+
class ListGeneratorsResponse
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
111
|
+
# The request message for
|
112
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#get_generator Generators.GetGenerator}.
|
113
|
+
# @!attribute [rw] name
|
114
|
+
# @return [::String]
|
115
|
+
# Required. The name of the generator.
|
116
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
117
|
+
# ID>/generators/<Generator ID>`.
|
118
|
+
# @!attribute [rw] language_code
|
119
|
+
# @return [::String]
|
120
|
+
# The language to list generators for.
|
121
|
+
class GetGeneratorRequest
|
122
|
+
include ::Google::Protobuf::MessageExts
|
123
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
124
|
+
end
|
125
|
+
|
126
|
+
# The request message for
|
127
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#create_generator Generators.CreateGenerator}.
|
128
|
+
# @!attribute [rw] parent
|
129
|
+
# @return [::String]
|
130
|
+
# Required. The agent to create a generator for.
|
131
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
132
|
+
# @!attribute [rw] generator
|
133
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Generator]
|
134
|
+
# Required. The generator to create.
|
135
|
+
# @!attribute [rw] language_code
|
136
|
+
# @return [::String]
|
137
|
+
# The language to create generators for the following fields:
|
138
|
+
# * `Generator.prompt_text.text`
|
139
|
+
# If not specified, the agent's default language is used.
|
140
|
+
class CreateGeneratorRequest
|
141
|
+
include ::Google::Protobuf::MessageExts
|
142
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
143
|
+
end
|
144
|
+
|
145
|
+
# The request message for
|
146
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#update_generator Generators.UpdateGenerator}.
|
147
|
+
# @!attribute [rw] generator
|
148
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Generator]
|
149
|
+
# Required. The generator to update.
|
150
|
+
# @!attribute [rw] language_code
|
151
|
+
# @return [::String]
|
152
|
+
# The language to list generators for.
|
153
|
+
# @!attribute [rw] update_mask
|
154
|
+
# @return [::Google::Protobuf::FieldMask]
|
155
|
+
# The mask to control which fields get updated. If the mask is not present,
|
156
|
+
# all fields will be updated.
|
157
|
+
class UpdateGeneratorRequest
|
158
|
+
include ::Google::Protobuf::MessageExts
|
159
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
160
|
+
end
|
161
|
+
|
162
|
+
# The request message for
|
163
|
+
# {::Google::Cloud::Dialogflow::CX::V3::Generators::Client#delete_generator Generators.DeleteGenerator}.
|
164
|
+
# @!attribute [rw] name
|
165
|
+
# @return [::String]
|
166
|
+
# Required. The name of the generator to delete.
|
167
|
+
# Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
168
|
+
# ID>/generators/<Generator ID>`.
|
169
|
+
# @!attribute [rw] force
|
170
|
+
# @return [::Boolean]
|
171
|
+
# This field has no effect for generators not being used.
|
172
|
+
# For generators that are used by pages/flows/transition route groups:
|
173
|
+
#
|
174
|
+
# * If `force` is set to false, an error will be returned with message
|
175
|
+
# indicating the referenced resources.
|
176
|
+
# * If `force` is set to true, Dialogflow will remove the generator, as well
|
177
|
+
# as any references to the generator (i.e.
|
178
|
+
# [Generator][Fulfillment.generator]) in fulfillments.
|
179
|
+
class DeleteGeneratorRequest
|
180
|
+
include ::Google::Protobuf::MessageExts
|
181
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 CX
|
24
|
+
module V3
|
25
|
+
# Inline destination for a Dialogflow operation that writes or exports objects
|
26
|
+
# (e.g. {::Google::Cloud::Dialogflow::CX::V3::Intent intents}) outside of Dialogflow.
|
27
|
+
# @!attribute [r] content
|
28
|
+
# @return [::String]
|
29
|
+
# Output only. The uncompressed byte content for the objects.
|
30
|
+
# Only populated in responses.
|
31
|
+
class InlineDestination
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
|
36
|
+
# Inline source for a Dialogflow operation that reads or imports objects
|
37
|
+
# (e.g. {::Google::Cloud::Dialogflow::CX::V3::Intent intents}) into Dialogflow.
|
38
|
+
# @!attribute [rw] content
|
39
|
+
# @return [::String]
|
40
|
+
# The uncompressed byte content for the objects.
|
41
|
+
class InlineSource
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|