google-cloud-dialogflow-v2 1.0.0 → 1.1.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/v2/answer_record_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +5 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +121 -23
- data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +114 -23
- data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +60 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_pb.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +567 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +809 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb +50 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +535 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +922 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +188 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb +54 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service.rb +56 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb +51 -0
- data/lib/google/cloud/dialogflow/v2/generator_pb.rb +71 -0
- data/lib/google/cloud/dialogflow/v2/generator_services_pb.rb +57 -0
- data/lib/google/cloud/dialogflow/v2/generators/client.rb +851 -0
- data/lib/google/cloud/dialogflow/v2/generators/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/generators/paths.rb +66 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +798 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +381 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest.rb +57 -0
- data/lib/google/cloud/dialogflow/v2/generators.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -1
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +110 -0
- data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +103 -0
- data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +68 -0
- data/lib/google/cloud/dialogflow/v2/rest.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +2 -0
- data/proto_docs/google/api/client.rb +14 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +22 -0
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +24 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +54 -26
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +27 -2
- data/proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb +81 -0
- data/proto_docs/google/cloud/dialogflow/v2/generator.rb +382 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +133 -0
- metadata +24 -2
@@ -1073,6 +1073,109 @@ module Google
|
|
1073
1073
|
raise ::Google::Cloud::Error.from_error(e)
|
1074
1074
|
end
|
1075
1075
|
|
1076
|
+
##
|
1077
|
+
# Gets knowledge assist suggestions based on historical messages.
|
1078
|
+
#
|
1079
|
+
# @overload suggest_knowledge_assist(request, options = nil)
|
1080
|
+
# Pass arguments to `suggest_knowledge_assist` via a request object, either of type
|
1081
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest} or an equivalent Hash.
|
1082
|
+
#
|
1083
|
+
# @param request [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest, ::Hash]
|
1084
|
+
# A request object representing the call parameters. Required. To specify no
|
1085
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1086
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1087
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1088
|
+
#
|
1089
|
+
# @overload suggest_knowledge_assist(parent: nil, latest_message: nil, context_size: nil, previous_suggested_query: nil)
|
1090
|
+
# Pass arguments to `suggest_knowledge_assist` via keyword arguments. Note that at
|
1091
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1092
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1093
|
+
#
|
1094
|
+
# @param parent [::String]
|
1095
|
+
# Required. The name of the participant to fetch suggestions for.
|
1096
|
+
# Format: `projects/<Project ID>/locations/<Location
|
1097
|
+
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
1098
|
+
# @param latest_message [::String]
|
1099
|
+
# Optional. The name of the latest conversation message to compile
|
1100
|
+
# suggestions for. If empty, it will be the latest message of the
|
1101
|
+
# conversation. Format: `projects/<Project ID>/locations/<Location
|
1102
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
1103
|
+
# @param context_size [::Integer]
|
1104
|
+
# Optional. Max number of messages prior to and including
|
1105
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest#latest_message latest_message}
|
1106
|
+
# to use as context when compiling the suggestion. The context size is by
|
1107
|
+
# default 100 and at most 100.
|
1108
|
+
# @param previous_suggested_query [::String]
|
1109
|
+
# Optional. The previously suggested query for the given conversation. This
|
1110
|
+
# helps identify whether the next suggestion we generate is resonably
|
1111
|
+
# different from the previous one. This is useful to avoid similar
|
1112
|
+
# suggestions within the conversation.
|
1113
|
+
#
|
1114
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1115
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
1116
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1117
|
+
#
|
1118
|
+
# @return [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
1119
|
+
#
|
1120
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1121
|
+
#
|
1122
|
+
# @example Basic example
|
1123
|
+
# require "google/cloud/dialogflow/v2"
|
1124
|
+
#
|
1125
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1126
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
1127
|
+
#
|
1128
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1129
|
+
# request = Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest.new
|
1130
|
+
#
|
1131
|
+
# # Call the suggest_knowledge_assist method.
|
1132
|
+
# result = client.suggest_knowledge_assist request
|
1133
|
+
#
|
1134
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse.
|
1135
|
+
# p result
|
1136
|
+
#
|
1137
|
+
def suggest_knowledge_assist request, options = nil
|
1138
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1139
|
+
|
1140
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest
|
1141
|
+
|
1142
|
+
# Converts hash and nil to an options object
|
1143
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1144
|
+
|
1145
|
+
# Customize the options with defaults
|
1146
|
+
metadata = @config.rpcs.suggest_knowledge_assist.metadata.to_h
|
1147
|
+
|
1148
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1149
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1150
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1151
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
1152
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1153
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1154
|
+
|
1155
|
+
header_params = {}
|
1156
|
+
if request.parent
|
1157
|
+
header_params["parent"] = request.parent
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1161
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1162
|
+
|
1163
|
+
options.apply_defaults timeout: @config.rpcs.suggest_knowledge_assist.timeout,
|
1164
|
+
metadata: metadata,
|
1165
|
+
retry_policy: @config.rpcs.suggest_knowledge_assist.retry_policy
|
1166
|
+
|
1167
|
+
options.apply_defaults timeout: @config.timeout,
|
1168
|
+
metadata: @config.metadata,
|
1169
|
+
retry_policy: @config.retry_policy
|
1170
|
+
|
1171
|
+
@participants_stub.call_rpc :suggest_knowledge_assist, request, options: options do |response, operation|
|
1172
|
+
yield response, operation if block_given?
|
1173
|
+
return response
|
1174
|
+
end
|
1175
|
+
rescue ::GRPC::BadStatus => e
|
1176
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1177
|
+
end
|
1178
|
+
|
1076
1179
|
##
|
1077
1180
|
# Configuration class for the Participants API.
|
1078
1181
|
#
|
@@ -1271,6 +1374,11 @@ module Google
|
|
1271
1374
|
# @return [::Gapic::Config::Method]
|
1272
1375
|
#
|
1273
1376
|
attr_reader :suggest_smart_replies
|
1377
|
+
##
|
1378
|
+
# RPC-specific configuration for `suggest_knowledge_assist`
|
1379
|
+
# @return [::Gapic::Config::Method]
|
1380
|
+
#
|
1381
|
+
attr_reader :suggest_knowledge_assist
|
1274
1382
|
|
1275
1383
|
# @private
|
1276
1384
|
def initialize parent_rpcs = nil
|
@@ -1292,6 +1400,8 @@ module Google
|
|
1292
1400
|
@suggest_faq_answers = ::Gapic::Config::Method.new suggest_faq_answers_config
|
1293
1401
|
suggest_smart_replies_config = parent_rpcs.suggest_smart_replies if parent_rpcs.respond_to? :suggest_smart_replies
|
1294
1402
|
@suggest_smart_replies = ::Gapic::Config::Method.new suggest_smart_replies_config
|
1403
|
+
suggest_knowledge_assist_config = parent_rpcs.suggest_knowledge_assist if parent_rpcs.respond_to? :suggest_knowledge_assist
|
1404
|
+
@suggest_knowledge_assist = ::Gapic::Config::Method.new suggest_knowledge_assist_config
|
1295
1405
|
|
1296
1406
|
yield self if block_given?
|
1297
1407
|
end
|
@@ -916,6 +916,102 @@ module Google
|
|
916
916
|
raise ::Google::Cloud::Error.from_error(e)
|
917
917
|
end
|
918
918
|
|
919
|
+
##
|
920
|
+
# Gets knowledge assist suggestions based on historical messages.
|
921
|
+
#
|
922
|
+
# @overload suggest_knowledge_assist(request, options = nil)
|
923
|
+
# Pass arguments to `suggest_knowledge_assist` via a request object, either of type
|
924
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest} or an equivalent Hash.
|
925
|
+
#
|
926
|
+
# @param request [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest, ::Hash]
|
927
|
+
# A request object representing the call parameters. Required. To specify no
|
928
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
929
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
930
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
931
|
+
#
|
932
|
+
# @overload suggest_knowledge_assist(parent: nil, latest_message: nil, context_size: nil, previous_suggested_query: nil)
|
933
|
+
# Pass arguments to `suggest_knowledge_assist` via keyword arguments. Note that at
|
934
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
935
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
936
|
+
#
|
937
|
+
# @param parent [::String]
|
938
|
+
# Required. The name of the participant to fetch suggestions for.
|
939
|
+
# Format: `projects/<Project ID>/locations/<Location
|
940
|
+
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
941
|
+
# @param latest_message [::String]
|
942
|
+
# Optional. The name of the latest conversation message to compile
|
943
|
+
# suggestions for. If empty, it will be the latest message of the
|
944
|
+
# conversation. Format: `projects/<Project ID>/locations/<Location
|
945
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
946
|
+
# @param context_size [::Integer]
|
947
|
+
# Optional. Max number of messages prior to and including
|
948
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest#latest_message latest_message}
|
949
|
+
# to use as context when compiling the suggestion. The context size is by
|
950
|
+
# default 100 and at most 100.
|
951
|
+
# @param previous_suggested_query [::String]
|
952
|
+
# Optional. The previously suggested query for the given conversation. This
|
953
|
+
# helps identify whether the next suggestion we generate is resonably
|
954
|
+
# different from the previous one. This is useful to avoid similar
|
955
|
+
# suggestions within the conversation.
|
956
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
957
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
958
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
959
|
+
#
|
960
|
+
# @return [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
961
|
+
#
|
962
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
963
|
+
#
|
964
|
+
# @example Basic example
|
965
|
+
# require "google/cloud/dialogflow/v2"
|
966
|
+
#
|
967
|
+
# # Create a client object. The client can be reused for multiple calls.
|
968
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Rest::Client.new
|
969
|
+
#
|
970
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
971
|
+
# request = Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest.new
|
972
|
+
#
|
973
|
+
# # Call the suggest_knowledge_assist method.
|
974
|
+
# result = client.suggest_knowledge_assist request
|
975
|
+
#
|
976
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse.
|
977
|
+
# p result
|
978
|
+
#
|
979
|
+
def suggest_knowledge_assist request, options = nil
|
980
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
981
|
+
|
982
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest
|
983
|
+
|
984
|
+
# Converts hash and nil to an options object
|
985
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
986
|
+
|
987
|
+
# Customize the options with defaults
|
988
|
+
call_metadata = @config.rpcs.suggest_knowledge_assist.metadata.to_h
|
989
|
+
|
990
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
991
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
992
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
993
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
|
994
|
+
transports_version_send: [:rest]
|
995
|
+
|
996
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
997
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
998
|
+
|
999
|
+
options.apply_defaults timeout: @config.rpcs.suggest_knowledge_assist.timeout,
|
1000
|
+
metadata: call_metadata,
|
1001
|
+
retry_policy: @config.rpcs.suggest_knowledge_assist.retry_policy
|
1002
|
+
|
1003
|
+
options.apply_defaults timeout: @config.timeout,
|
1004
|
+
metadata: @config.metadata,
|
1005
|
+
retry_policy: @config.retry_policy
|
1006
|
+
|
1007
|
+
@participants_stub.suggest_knowledge_assist request, options do |result, operation|
|
1008
|
+
yield result, operation if block_given?
|
1009
|
+
return result
|
1010
|
+
end
|
1011
|
+
rescue ::Gapic::Rest::Error => e
|
1012
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1013
|
+
end
|
1014
|
+
|
919
1015
|
##
|
920
1016
|
# Configuration class for the Participants REST API.
|
921
1017
|
#
|
@@ -1096,6 +1192,11 @@ module Google
|
|
1096
1192
|
# @return [::Gapic::Config::Method]
|
1097
1193
|
#
|
1098
1194
|
attr_reader :suggest_smart_replies
|
1195
|
+
##
|
1196
|
+
# RPC-specific configuration for `suggest_knowledge_assist`
|
1197
|
+
# @return [::Gapic::Config::Method]
|
1198
|
+
#
|
1199
|
+
attr_reader :suggest_knowledge_assist
|
1099
1200
|
|
1100
1201
|
# @private
|
1101
1202
|
def initialize parent_rpcs = nil
|
@@ -1115,6 +1216,8 @@ module Google
|
|
1115
1216
|
@suggest_faq_answers = ::Gapic::Config::Method.new suggest_faq_answers_config
|
1116
1217
|
suggest_smart_replies_config = parent_rpcs.suggest_smart_replies if parent_rpcs.respond_to? :suggest_smart_replies
|
1117
1218
|
@suggest_smart_replies = ::Gapic::Config::Method.new suggest_smart_replies_config
|
1219
|
+
suggest_knowledge_assist_config = parent_rpcs.suggest_knowledge_assist if parent_rpcs.respond_to? :suggest_knowledge_assist
|
1220
|
+
@suggest_knowledge_assist = ::Gapic::Config::Method.new suggest_knowledge_assist_config
|
1118
1221
|
|
1119
1222
|
yield self if block_given?
|
1120
1223
|
end
|
@@ -365,6 +365,44 @@ module Google
|
|
365
365
|
result
|
366
366
|
end
|
367
367
|
|
368
|
+
##
|
369
|
+
# Baseline implementation for the suggest_knowledge_assist REST call
|
370
|
+
#
|
371
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest]
|
372
|
+
# A request object representing the call parameters. Required.
|
373
|
+
# @param options [::Gapic::CallOptions]
|
374
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
375
|
+
#
|
376
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
377
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
378
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
379
|
+
#
|
380
|
+
# @return [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse]
|
381
|
+
# A result object deserialized from the server's reply
|
382
|
+
def suggest_knowledge_assist request_pb, options = nil
|
383
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
384
|
+
|
385
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_suggest_knowledge_assist_request request_pb
|
386
|
+
query_string_params = if query_string_params.any?
|
387
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
388
|
+
else
|
389
|
+
{}
|
390
|
+
end
|
391
|
+
|
392
|
+
response = @client_stub.make_http_request(
|
393
|
+
verb,
|
394
|
+
uri: uri,
|
395
|
+
body: body || "",
|
396
|
+
params: query_string_params,
|
397
|
+
options: options
|
398
|
+
)
|
399
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
400
|
+
result = ::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistResponse.decode_json response.body, ignore_unknown_fields: true
|
401
|
+
|
402
|
+
yield result, operation if block_given?
|
403
|
+
result
|
404
|
+
end
|
405
|
+
|
368
406
|
##
|
369
407
|
# @private
|
370
408
|
#
|
@@ -600,6 +638,36 @@ module Google
|
|
600
638
|
)
|
601
639
|
transcoder.transcode request_pb
|
602
640
|
end
|
641
|
+
|
642
|
+
##
|
643
|
+
# @private
|
644
|
+
#
|
645
|
+
# GRPC transcoding helper method for the suggest_knowledge_assist REST call
|
646
|
+
#
|
647
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::SuggestKnowledgeAssistRequest]
|
648
|
+
# A request object representing the call parameters. Required.
|
649
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
650
|
+
# Uri, Body, Query string parameters
|
651
|
+
def self.transcode_suggest_knowledge_assist_request request_pb
|
652
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
653
|
+
.with_bindings(
|
654
|
+
uri_method: :post,
|
655
|
+
uri_template: "/v2/{parent}/suggestions:suggestKnowledgeAssist",
|
656
|
+
body: "*",
|
657
|
+
matches: [
|
658
|
+
["parent", %r{^projects/[^/]+/conversations/[^/]+/participants/[^/]+/?$}, false]
|
659
|
+
]
|
660
|
+
)
|
661
|
+
.with_bindings(
|
662
|
+
uri_method: :post,
|
663
|
+
uri_template: "/v2/{parent}/suggestions:suggestKnowledgeAssist",
|
664
|
+
body: "*",
|
665
|
+
matches: [
|
666
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+/?$}, false]
|
667
|
+
]
|
668
|
+
)
|
669
|
+
transcoder.transcode request_pb
|
670
|
+
end
|
603
671
|
end
|
604
672
|
end
|
605
673
|
end
|
@@ -25,10 +25,12 @@ require "google/cloud/dialogflow/v2/sessions/rest"
|
|
25
25
|
require "google/cloud/dialogflow/v2/participants/rest"
|
26
26
|
require "google/cloud/dialogflow/v2/answer_records/rest"
|
27
27
|
require "google/cloud/dialogflow/v2/conversation_profiles/rest"
|
28
|
+
require "google/cloud/dialogflow/v2/generators/rest"
|
28
29
|
require "google/cloud/dialogflow/v2/conversations/rest"
|
29
30
|
require "google/cloud/dialogflow/v2/conversation_datasets/rest"
|
30
31
|
require "google/cloud/dialogflow/v2/conversation_models/rest"
|
31
32
|
require "google/cloud/dialogflow/v2/documents/rest"
|
33
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/rest"
|
32
34
|
require "google/cloud/dialogflow/v2/fulfillments/rest"
|
33
35
|
require "google/cloud/dialogflow/v2/environments/rest"
|
34
36
|
require "google/cloud/dialogflow/v2/knowledge_bases/rest"
|
@@ -25,10 +25,12 @@ require "google/cloud/dialogflow/v2/sessions"
|
|
25
25
|
require "google/cloud/dialogflow/v2/participants"
|
26
26
|
require "google/cloud/dialogflow/v2/answer_records"
|
27
27
|
require "google/cloud/dialogflow/v2/conversation_profiles"
|
28
|
+
require "google/cloud/dialogflow/v2/generators"
|
28
29
|
require "google/cloud/dialogflow/v2/conversations"
|
29
30
|
require "google/cloud/dialogflow/v2/conversation_datasets"
|
30
31
|
require "google/cloud/dialogflow/v2/conversation_models"
|
31
32
|
require "google/cloud/dialogflow/v2/documents"
|
33
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service"
|
32
34
|
require "google/cloud/dialogflow/v2/fulfillments"
|
33
35
|
require "google/cloud/dialogflow/v2/environments"
|
34
36
|
require "google/cloud/dialogflow/v2/knowledge_bases"
|
@@ -290,6 +290,13 @@ module Google
|
|
290
290
|
# @return [::String]
|
291
291
|
# The fully qualified name of the method, for which the options below apply.
|
292
292
|
# This is used to find the method to apply the options.
|
293
|
+
#
|
294
|
+
# Example:
|
295
|
+
#
|
296
|
+
# publishing:
|
297
|
+
# method_settings:
|
298
|
+
# - selector: google.storage.control.v2.StorageControl.CreateFolder
|
299
|
+
# # method settings for CreateFolder...
|
293
300
|
# @!attribute [rw] long_running
|
294
301
|
# @return [::Google::Api::MethodSettings::LongRunning]
|
295
302
|
# Describes settings to use for long-running operations when generating
|
@@ -298,17 +305,14 @@ module Google
|
|
298
305
|
#
|
299
306
|
# Example of a YAML configuration::
|
300
307
|
#
|
301
|
-
#
|
302
|
-
#
|
308
|
+
# publishing:
|
309
|
+
# method_settings:
|
303
310
|
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
304
311
|
# long_running:
|
305
|
-
# initial_poll_delay:
|
306
|
-
# seconds: 60 # 1 minute
|
312
|
+
# initial_poll_delay: 60s # 1 minute
|
307
313
|
# poll_delay_multiplier: 1.5
|
308
|
-
# max_poll_delay:
|
309
|
-
#
|
310
|
-
# total_poll_timeout:
|
311
|
-
# seconds: 54000 # 90 minutes
|
314
|
+
# max_poll_delay: 360s # 6 minutes
|
315
|
+
# total_poll_timeout: 54000s # 90 minutes
|
312
316
|
# @!attribute [rw] auto_populated_fields
|
313
317
|
# @return [::Array<::String>]
|
314
318
|
# List of top-level fields of the request message, that should be
|
@@ -317,8 +321,8 @@ module Google
|
|
317
321
|
#
|
318
322
|
# Example of a YAML configuration:
|
319
323
|
#
|
320
|
-
#
|
321
|
-
#
|
324
|
+
# publishing:
|
325
|
+
# method_settings:
|
322
326
|
# - selector: google.example.v1.ExampleService.CreateExample
|
323
327
|
# auto_populated_fields:
|
324
328
|
# - request_id
|
@@ -124,8 +124,13 @@ module Google
|
|
124
124
|
# @return [::String]
|
125
125
|
# The plural name used in the resource name and permission names, such as
|
126
126
|
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
127
|
-
# name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
128
|
-
#
|
127
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
|
128
|
+
# to this is for Nested Collections that have stuttering names, as defined
|
129
|
+
# in [AIP-122](https://google.aip.dev/122#nested-collections), where the
|
130
|
+
# collection ID in the resource name pattern does not necessarily directly
|
131
|
+
# match the `plural` value.
|
132
|
+
#
|
133
|
+
# It is the same concept of the `plural` field in k8s CRD spec
|
129
134
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
130
135
|
#
|
131
136
|
# Note: The plural form is required even for singleton resources. See
|
@@ -210,6 +210,9 @@ module Google
|
|
210
210
|
# @!attribute [rw] knowledge_search_feedback
|
211
211
|
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::KnowledgeSearchFeedback]
|
212
212
|
# Optional. Feedback for knowledge search.
|
213
|
+
# @!attribute [rw] knowledge_assist_feedback
|
214
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::KnowledgeAssistFeedback]
|
215
|
+
# Optional. Feedback for knowledge assist.
|
213
216
|
class AgentAssistantFeedback
|
214
217
|
include ::Google::Protobuf::MessageExts
|
215
218
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -260,6 +263,25 @@ module Google
|
|
260
263
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
261
264
|
end
|
262
265
|
|
266
|
+
# Feedback for knowledge assist.
|
267
|
+
# @!attribute [rw] answer_copied
|
268
|
+
# @return [::Boolean]
|
269
|
+
# Whether the suggested answer was copied by the human agent.
|
270
|
+
# If the value is set to be true,
|
271
|
+
# {::Google::Cloud::Dialogflow::V2::AnswerFeedback#clicked AnswerFeedback.clicked}
|
272
|
+
# will be updated to be true.
|
273
|
+
# @!attribute [rw] clicked_uris
|
274
|
+
# @return [::Array<::String>]
|
275
|
+
# The URIs clicked by the human agent. The value is appended for each
|
276
|
+
# UpdateAnswerRecordRequest.
|
277
|
+
# If the value is not empty,
|
278
|
+
# {::Google::Cloud::Dialogflow::V2::AnswerFeedback#clicked AnswerFeedback.clicked}
|
279
|
+
# will be updated to be true.
|
280
|
+
class KnowledgeAssistFeedback
|
281
|
+
include ::Google::Protobuf::MessageExts
|
282
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
283
|
+
end
|
284
|
+
|
263
285
|
# Relevance of an answer.
|
264
286
|
module AnswerRelevance
|
265
287
|
# Answer relevance unspecified.
|
@@ -291,6 +291,30 @@ module Google
|
|
291
291
|
# [Agent Speech
|
292
292
|
# settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
|
293
293
|
# for model selection.
|
294
|
+
# @!attribute [rw] audio_encoding
|
295
|
+
# @return [::Google::Cloud::Dialogflow::V2::AudioEncoding]
|
296
|
+
# Audio encoding of the audio content to process.
|
297
|
+
# @!attribute [rw] sample_rate_hertz
|
298
|
+
# @return [::Integer]
|
299
|
+
# Sample rate (in Hertz) of the audio content sent in the query.
|
300
|
+
# Refer to [Cloud Speech API
|
301
|
+
# documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
302
|
+
# more details.
|
303
|
+
# @!attribute [rw] language_code
|
304
|
+
# @return [::String]
|
305
|
+
# The language of the supplied audio. Dialogflow does not do
|
306
|
+
# translations. See [Language
|
307
|
+
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
308
|
+
# for a list of the currently supported language codes. Note that queries in
|
309
|
+
# the same session do not necessarily need to specify the same language.
|
310
|
+
# @!attribute [rw] enable_word_info
|
311
|
+
# @return [::Boolean]
|
312
|
+
# If `true`, Dialogflow returns
|
313
|
+
# {::Google::Cloud::Dialogflow::V2::SpeechWordInfo SpeechWordInfo} in
|
314
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult StreamingRecognitionResult}
|
315
|
+
# with information about the recognized speech words, e.g. start and end time
|
316
|
+
# offsets. If false or unspecified, Speech doesn't return any word-level
|
317
|
+
# information.
|
294
318
|
# @!attribute [rw] use_timeout_based_endpointing
|
295
319
|
# @return [::Boolean]
|
296
320
|
# Use timeout based endpointing, interpreting endpointer sensitivy as
|