google-cloud-dialogflow-v2 0.13.0 → 0.14.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/audio_config_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +5 -0
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +20 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +11 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +123 -0
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +5 -1
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +22 -0
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +113 -4
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +13 -0
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +65 -0
- data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +11 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +88 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3231bca201f6d59200723584d77013bade56fc63cb9dc62f2fc3394fe81abb5d
|
4
|
+
data.tar.gz: 81fd657b5838cf3a7baa8c15286a66b83225cab04bceb888a55226fc5af7f65c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c378f99053501b2b0d37ab7d89f87b72163322bb9485bdc15c01fe25494da6be9acff47347788ab490ebc3dddbc581f0ad99266bab1cb1411dafd6ca323a32d6
|
7
|
+
data.tar.gz: a79eec1d29803050543ae5051413bb666efefd4d483d378c467b8d1036737320a955e21e304c5f37d97287fa63647f3ace35cf26ff37e258bc01ca73242e5299
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/audio_config.proto
|
3
3
|
|
4
|
+
require 'google/api/annotations_pb'
|
4
5
|
require 'google/api/field_behavior_pb'
|
5
6
|
require 'google/api/resource_pb'
|
6
7
|
require 'google/protobuf/duration_pb'
|
7
8
|
require 'google/protobuf/timestamp_pb'
|
8
|
-
require 'google/api/annotations_pb'
|
9
9
|
require 'google/protobuf'
|
10
10
|
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/conversation_event.proto
|
3
3
|
|
4
|
+
require 'google/api/annotations_pb'
|
4
5
|
require 'google/cloud/dialogflow/v2/participant_pb'
|
5
6
|
require 'google/rpc/status_pb'
|
6
|
-
require 'google/api/annotations_pb'
|
7
7
|
require 'google/protobuf'
|
8
8
|
|
9
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -5,6 +5,8 @@ require 'google/api/annotations_pb'
|
|
5
5
|
require 'google/api/client_pb'
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
7
|
require 'google/api/resource_pb'
|
8
|
+
require 'google/cloud/dialogflow/v2/audio_config_pb'
|
9
|
+
require 'google/cloud/dialogflow/v2/conversation_profile_pb'
|
8
10
|
require 'google/cloud/dialogflow/v2/participant_pb'
|
9
11
|
require 'google/protobuf/empty_pb'
|
10
12
|
require 'google/protobuf/timestamp_pb'
|
@@ -74,6 +74,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
74
74
|
optional :suggestion_trigger_settings, :message, 10, "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings"
|
75
75
|
optional :query_config, :message, 6, "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig"
|
76
76
|
optional :conversation_model_config, :message, 7, "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig"
|
77
|
+
optional :conversation_process_config, :message, 8, "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig"
|
77
78
|
end
|
78
79
|
add_message "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig" do
|
79
80
|
repeated :feature_configs, :message, 2, "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig"
|
@@ -106,6 +107,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
106
107
|
add_message "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig" do
|
107
108
|
optional :model, :string, 1
|
108
109
|
end
|
110
|
+
add_message "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig" do
|
111
|
+
optional :recent_sentences_count, :int32, 2
|
112
|
+
end
|
109
113
|
add_message "google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig" do
|
110
114
|
optional :enable_entity_extraction, :bool, 2
|
111
115
|
optional :enable_sentiment_analysis, :bool, 3
|
@@ -171,6 +175,7 @@ module Google
|
|
171
175
|
HumanAgentAssistantConfig::SuggestionQueryConfig::DialogflowQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource").msgclass
|
172
176
|
HumanAgentAssistantConfig::SuggestionQueryConfig::ContextFilterSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings").msgclass
|
173
177
|
HumanAgentAssistantConfig::ConversationModelConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig").msgclass
|
178
|
+
HumanAgentAssistantConfig::ConversationProcessConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig").msgclass
|
174
179
|
HumanAgentAssistantConfig::MessageAnalysisConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig").msgclass
|
175
180
|
HumanAgentHandoffConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentHandoffConfig").msgclass
|
176
181
|
HumanAgentHandoffConfig::LivePersonConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig").msgclass
|
@@ -54,6 +54,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
54
54
|
optional :parent, :string, 1
|
55
55
|
optional :document, :message, 2, "google.cloud.dialogflow.v2.Document"
|
56
56
|
end
|
57
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentsRequest" do
|
58
|
+
optional :parent, :string, 1
|
59
|
+
optional :document_template, :message, 3, "google.cloud.dialogflow.v2.ImportDocumentTemplate"
|
60
|
+
optional :import_gcs_custom_metadata, :bool, 4
|
61
|
+
oneof :source do
|
62
|
+
optional :gcs_source, :message, 2, "google.cloud.dialogflow.v2.GcsSources"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentTemplate" do
|
66
|
+
optional :mime_type, :string, 1
|
67
|
+
repeated :knowledge_types, :enum, 2, "google.cloud.dialogflow.v2.Document.KnowledgeType"
|
68
|
+
map :metadata, :string, :string, 3
|
69
|
+
end
|
70
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentsResponse" do
|
71
|
+
repeated :warnings, :message, 1, "google.rpc.Status"
|
72
|
+
end
|
57
73
|
add_message "google.cloud.dialogflow.v2.DeleteDocumentRequest" do
|
58
74
|
optional :name, :string, 1
|
59
75
|
end
|
@@ -79,6 +95,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
79
95
|
end
|
80
96
|
add_message "google.cloud.dialogflow.v2.KnowledgeOperationMetadata" do
|
81
97
|
optional :state, :enum, 1, "google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State"
|
98
|
+
optional :knowledge_base, :string, 3
|
82
99
|
end
|
83
100
|
add_enum "google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State" do
|
84
101
|
value :STATE_UNSPECIFIED, 0
|
@@ -100,6 +117,9 @@ module Google
|
|
100
117
|
ListDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListDocumentsRequest").msgclass
|
101
118
|
ListDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListDocumentsResponse").msgclass
|
102
119
|
CreateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateDocumentRequest").msgclass
|
120
|
+
ImportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentsRequest").msgclass
|
121
|
+
ImportDocumentTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentTemplate").msgclass
|
122
|
+
ImportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentsResponse").msgclass
|
103
123
|
DeleteDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteDocumentRequest").msgclass
|
104
124
|
UpdateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateDocumentRequest").msgclass
|
105
125
|
ReloadDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ReloadDocumentRequest").msgclass
|
@@ -46,6 +46,17 @@ module Google
|
|
46
46
|
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
47
47
|
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
48
48
|
rpc :CreateDocument, ::Google::Cloud::Dialogflow::V2::CreateDocumentRequest, ::Google::Longrunning::Operation
|
49
|
+
# Creates documents by importing data from external sources.
|
50
|
+
# Dialogflow supports up to 350 documents in each request. If you try to
|
51
|
+
# import more, Dialogflow will return an error.
|
52
|
+
#
|
53
|
+
# This method is a [long-running
|
54
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
55
|
+
# The returned `Operation` type has the following method-specific fields:
|
56
|
+
#
|
57
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
58
|
+
# - `response`: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse]
|
59
|
+
rpc :ImportDocuments, ::Google::Cloud::Dialogflow::V2::ImportDocumentsRequest, ::Google::Longrunning::Operation
|
49
60
|
# Deletes the specified document.
|
50
61
|
#
|
51
62
|
# This method is a [long-running
|
@@ -474,6 +474,122 @@ module Google
|
|
474
474
|
raise ::Google::Cloud::Error.from_error(e)
|
475
475
|
end
|
476
476
|
|
477
|
+
##
|
478
|
+
# Creates documents by importing data from external sources.
|
479
|
+
# Dialogflow supports up to 350 documents in each request. If you try to
|
480
|
+
# import more, Dialogflow will return an error.
|
481
|
+
#
|
482
|
+
# This method is a [long-running
|
483
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
484
|
+
# The returned `Operation` type has the following method-specific fields:
|
485
|
+
#
|
486
|
+
# - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
|
487
|
+
# - `response`: {::Google::Cloud::Dialogflow::V2::ImportDocumentsResponse ImportDocumentsResponse}
|
488
|
+
#
|
489
|
+
# @overload import_documents(request, options = nil)
|
490
|
+
# Pass arguments to `import_documents` via a request object, either of type
|
491
|
+
# {::Google::Cloud::Dialogflow::V2::ImportDocumentsRequest} or an equivalent Hash.
|
492
|
+
#
|
493
|
+
# @param request [::Google::Cloud::Dialogflow::V2::ImportDocumentsRequest, ::Hash]
|
494
|
+
# A request object representing the call parameters. Required. To specify no
|
495
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
496
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
497
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
498
|
+
#
|
499
|
+
# @overload import_documents(parent: nil, gcs_source: nil, document_template: nil, import_gcs_custom_metadata: nil)
|
500
|
+
# Pass arguments to `import_documents` via keyword arguments. Note that at
|
501
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
502
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
503
|
+
#
|
504
|
+
# @param parent [::String]
|
505
|
+
# Required. The knowledge base to import documents into.
|
506
|
+
# Format: `projects/<Project ID>/locations/<Location
|
507
|
+
# ID>/knowledgeBases/<Knowledge Base ID>`.
|
508
|
+
# @param gcs_source [::Google::Cloud::Dialogflow::V2::GcsSources, ::Hash]
|
509
|
+
# The Google Cloud Storage location for the documents.
|
510
|
+
# The path can include a wildcard.
|
511
|
+
#
|
512
|
+
# These URIs may have the forms
|
513
|
+
# `gs://<bucket-name>/<object-name>`.
|
514
|
+
# `gs://<bucket-name>/<object-path>/*.<extension>`.
|
515
|
+
# @param document_template [::Google::Cloud::Dialogflow::V2::ImportDocumentTemplate, ::Hash]
|
516
|
+
# Required. Document template used for importing all the documents.
|
517
|
+
# @param import_gcs_custom_metadata [::Boolean]
|
518
|
+
# Whether to import custom metadata from Google Cloud Storage.
|
519
|
+
# Only valid when the document source is Google Cloud Storage URI.
|
520
|
+
#
|
521
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
522
|
+
# @yieldparam response [::Gapic::Operation]
|
523
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
524
|
+
#
|
525
|
+
# @return [::Gapic::Operation]
|
526
|
+
#
|
527
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
528
|
+
#
|
529
|
+
# @example Basic example
|
530
|
+
# require "google/cloud/dialogflow/v2"
|
531
|
+
#
|
532
|
+
# # Create a client object. The client can be reused for multiple calls.
|
533
|
+
# client = Google::Cloud::Dialogflow::V2::Documents::Client.new
|
534
|
+
#
|
535
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
536
|
+
# request = Google::Cloud::Dialogflow::V2::ImportDocumentsRequest.new
|
537
|
+
#
|
538
|
+
# # Call the import_documents method.
|
539
|
+
# result = client.import_documents request
|
540
|
+
#
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
542
|
+
# # object to check the status of an operation, cancel it, or wait
|
543
|
+
# # for results. Here is how to block until completion:
|
544
|
+
# result.wait_until_done! timeout: 60
|
545
|
+
# if result.response?
|
546
|
+
# p result.response
|
547
|
+
# else
|
548
|
+
# puts "Error!"
|
549
|
+
# end
|
550
|
+
#
|
551
|
+
def import_documents request, options = nil
|
552
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
553
|
+
|
554
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ImportDocumentsRequest
|
555
|
+
|
556
|
+
# Converts hash and nil to an options object
|
557
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
|
+
|
559
|
+
# Customize the options with defaults
|
560
|
+
metadata = @config.rpcs.import_documents.metadata.to_h
|
561
|
+
|
562
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
563
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
564
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
565
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
566
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
567
|
+
|
568
|
+
header_params = {}
|
569
|
+
if request.parent
|
570
|
+
header_params["parent"] = request.parent
|
571
|
+
end
|
572
|
+
|
573
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
574
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
575
|
+
|
576
|
+
options.apply_defaults timeout: @config.rpcs.import_documents.timeout,
|
577
|
+
metadata: metadata,
|
578
|
+
retry_policy: @config.rpcs.import_documents.retry_policy
|
579
|
+
|
580
|
+
options.apply_defaults timeout: @config.timeout,
|
581
|
+
metadata: @config.metadata,
|
582
|
+
retry_policy: @config.retry_policy
|
583
|
+
|
584
|
+
@documents_stub.call_rpc :import_documents, request, options: options do |response, operation|
|
585
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
586
|
+
yield response, operation if block_given?
|
587
|
+
return response
|
588
|
+
end
|
589
|
+
rescue ::GRPC::BadStatus => e
|
590
|
+
raise ::Google::Cloud::Error.from_error(e)
|
591
|
+
end
|
592
|
+
|
477
593
|
##
|
478
594
|
# Deletes the specified document.
|
479
595
|
#
|
@@ -1063,6 +1179,11 @@ module Google
|
|
1063
1179
|
#
|
1064
1180
|
attr_reader :create_document
|
1065
1181
|
##
|
1182
|
+
# RPC-specific configuration for `import_documents`
|
1183
|
+
# @return [::Gapic::Config::Method]
|
1184
|
+
#
|
1185
|
+
attr_reader :import_documents
|
1186
|
+
##
|
1066
1187
|
# RPC-specific configuration for `delete_document`
|
1067
1188
|
# @return [::Gapic::Config::Method]
|
1068
1189
|
#
|
@@ -1091,6 +1212,8 @@ module Google
|
|
1091
1212
|
@get_document = ::Gapic::Config::Method.new get_document_config
|
1092
1213
|
create_document_config = parent_rpcs.create_document if parent_rpcs.respond_to? :create_document
|
1093
1214
|
@create_document = ::Gapic::Config::Method.new create_document_config
|
1215
|
+
import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents
|
1216
|
+
@import_documents = ::Gapic::Config::Method.new import_documents_config
|
1094
1217
|
delete_document_config = parent_rpcs.delete_document if parent_rpcs.respond_to? :delete_document
|
1095
1218
|
@delete_document = ::Gapic::Config::Method.new delete_document_config
|
1096
1219
|
update_document_config = parent_rpcs.update_document if parent_rpcs.respond_to? :update_document
|
@@ -1,12 +1,15 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/gcs.proto
|
3
3
|
|
4
|
-
require 'google/api/field_behavior_pb'
|
5
4
|
require 'google/api/annotations_pb'
|
5
|
+
require 'google/api/field_behavior_pb'
|
6
6
|
require 'google/protobuf'
|
7
7
|
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/dialogflow/v2/gcs.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.dialogflow.v2.GcsSources" do
|
11
|
+
repeated :uris, :string, 2
|
12
|
+
end
|
10
13
|
add_message "google.cloud.dialogflow.v2.GcsDestination" do
|
11
14
|
optional :uri, :string, 1
|
12
15
|
end
|
@@ -17,6 +20,7 @@ module Google
|
|
17
20
|
module Cloud
|
18
21
|
module Dialogflow
|
19
22
|
module V2
|
23
|
+
GcsSources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GcsSources").msgclass
|
20
24
|
GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GcsDestination").msgclass
|
21
25
|
end
|
22
26
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/human_agent_assistant_event.proto
|
3
3
|
|
4
|
-
require 'google/cloud/dialogflow/v2/participant_pb'
|
5
4
|
require 'google/api/annotations_pb'
|
5
|
+
require 'google/cloud/dialogflow/v2/participant_pb'
|
6
6
|
require 'google/protobuf'
|
7
7
|
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -37,7 +37,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
37
37
|
optional :participant, :string, 4
|
38
38
|
optional :participant_role, :enum, 5, "google.cloud.dialogflow.v2.Participant.Role"
|
39
39
|
optional :create_time, :message, 6, "google.protobuf.Timestamp"
|
40
|
+
optional :send_time, :message, 9, "google.protobuf.Timestamp"
|
40
41
|
optional :message_annotation, :message, 7, "google.cloud.dialogflow.v2.MessageAnnotation"
|
42
|
+
optional :sentiment_analysis, :message, 8, "google.cloud.dialogflow.v2.SentimentAnalysisResult"
|
41
43
|
end
|
42
44
|
add_message "google.cloud.dialogflow.v2.CreateParticipantRequest" do
|
43
45
|
optional :parent, :string, 1
|
@@ -104,6 +106,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
104
106
|
optional :latest_message, :string, 2
|
105
107
|
optional :context_size, :int32, 3
|
106
108
|
end
|
109
|
+
add_message "google.cloud.dialogflow.v2.SuggestSmartRepliesRequest" do
|
110
|
+
optional :parent, :string, 1
|
111
|
+
optional :current_text_input, :message, 4, "google.cloud.dialogflow.v2.TextInput"
|
112
|
+
optional :latest_message, :string, 2
|
113
|
+
optional :context_size, :int32, 3
|
114
|
+
end
|
115
|
+
add_message "google.cloud.dialogflow.v2.SuggestSmartRepliesResponse" do
|
116
|
+
repeated :smart_reply_answers, :message, 1, "google.cloud.dialogflow.v2.SmartReplyAnswer"
|
117
|
+
optional :latest_message, :string, 2
|
118
|
+
optional :context_size, :int32, 3
|
119
|
+
end
|
107
120
|
add_message "google.cloud.dialogflow.v2.OutputAudio" do
|
108
121
|
optional :config, :message, 1, "google.cloud.dialogflow.v2.OutputAudioConfig"
|
109
122
|
optional :audio, :bytes, 2
|
@@ -134,11 +147,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
134
147
|
map :metadata, :string, :string, 5
|
135
148
|
optional :answer_record, :string, 6
|
136
149
|
end
|
150
|
+
add_message "google.cloud.dialogflow.v2.SmartReplyAnswer" do
|
151
|
+
optional :reply, :string, 1
|
152
|
+
optional :confidence, :float, 2
|
153
|
+
optional :answer_record, :string, 3
|
154
|
+
end
|
137
155
|
add_message "google.cloud.dialogflow.v2.SuggestionResult" do
|
138
156
|
oneof :suggestion_response do
|
139
157
|
optional :error, :message, 1, "google.rpc.Status"
|
140
158
|
optional :suggest_articles_response, :message, 2, "google.cloud.dialogflow.v2.SuggestArticlesResponse"
|
141
159
|
optional :suggest_faq_answers_response, :message, 3, "google.cloud.dialogflow.v2.SuggestFaqAnswersResponse"
|
160
|
+
optional :suggest_smart_replies_response, :message, 4, "google.cloud.dialogflow.v2.SuggestSmartRepliesResponse"
|
142
161
|
end
|
143
162
|
end
|
144
163
|
add_message "google.cloud.dialogflow.v2.AnnotatedMessagePart" do
|
@@ -175,11 +194,14 @@ module Google
|
|
175
194
|
SuggestArticlesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestArticlesResponse").msgclass
|
176
195
|
SuggestFaqAnswersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestFaqAnswersRequest").msgclass
|
177
196
|
SuggestFaqAnswersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestFaqAnswersResponse").msgclass
|
197
|
+
SuggestSmartRepliesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestSmartRepliesRequest").msgclass
|
198
|
+
SuggestSmartRepliesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestSmartRepliesResponse").msgclass
|
178
199
|
OutputAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.OutputAudio").msgclass
|
179
200
|
AutomatedAgentReply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AutomatedAgentReply").msgclass
|
180
201
|
AutomatedAgentReply::AutomatedAgentReplyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType").enummodule
|
181
202
|
ArticleAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ArticleAnswer").msgclass
|
182
203
|
FaqAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.FaqAnswer").msgclass
|
204
|
+
SmartReplyAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SmartReplyAnswer").msgclass
|
183
205
|
SuggestionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SuggestionResult").msgclass
|
184
206
|
AnnotatedMessagePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AnnotatedMessagePart").msgclass
|
185
207
|
MessageAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.MessageAnnotation").msgclass
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# Gets suggested faq answers for a participant based on specific historical
|
55
55
|
# messages.
|
56
56
|
rpc :SuggestFaqAnswers, ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest, ::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse
|
57
|
+
# Gets smart replies for a participant based on specific historical
|
58
|
+
# messages.
|
59
|
+
rpc :SuggestSmartReplies, ::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest, ::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse
|
57
60
|
end
|
58
61
|
|
59
62
|
Stub = Service.rpc_stub_class
|
@@ -650,13 +650,13 @@ module Google
|
|
650
650
|
# Format: `projects/<Project ID>/locations/<Location
|
651
651
|
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
652
652
|
# @param latest_message [::String]
|
653
|
-
# The name of the latest conversation message to compile suggestion
|
653
|
+
# Optional. The name of the latest conversation message to compile suggestion
|
654
654
|
# for. If empty, it will be the latest message of the conversation.
|
655
655
|
#
|
656
656
|
# Format: `projects/<Project ID>/locations/<Location
|
657
657
|
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
658
658
|
# @param context_size [::Integer]
|
659
|
-
# Max number of messages prior to and including
|
659
|
+
# Optional. Max number of messages prior to and including
|
660
660
|
# {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
|
661
661
|
# when compiling the suggestion. By default 20 and at most 50.
|
662
662
|
# @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
|
@@ -750,13 +750,13 @@ module Google
|
|
750
750
|
# Format: `projects/<Project ID>/locations/<Location
|
751
751
|
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
752
752
|
# @param latest_message [::String]
|
753
|
-
# The name of the latest conversation message to compile suggestion
|
753
|
+
# Optional. The name of the latest conversation message to compile suggestion
|
754
754
|
# for. If empty, it will be the latest message of the conversation.
|
755
755
|
#
|
756
756
|
# Format: `projects/<Project ID>/locations/<Location
|
757
757
|
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
758
758
|
# @param context_size [::Integer]
|
759
|
-
# Max number of messages prior to and including
|
759
|
+
# Optional. Max number of messages prior to and including
|
760
760
|
# [latest_message] to use as context when compiling the
|
761
761
|
# suggestion. By default 20 and at most 50.
|
762
762
|
# @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
|
@@ -826,6 +826,108 @@ module Google
|
|
826
826
|
raise ::Google::Cloud::Error.from_error(e)
|
827
827
|
end
|
828
828
|
|
829
|
+
##
|
830
|
+
# Gets smart replies for a participant based on specific historical
|
831
|
+
# messages.
|
832
|
+
#
|
833
|
+
# @overload suggest_smart_replies(request, options = nil)
|
834
|
+
# Pass arguments to `suggest_smart_replies` via a request object, either of type
|
835
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest} or an equivalent Hash.
|
836
|
+
#
|
837
|
+
# @param request [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest, ::Hash]
|
838
|
+
# A request object representing the call parameters. Required. To specify no
|
839
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
840
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
841
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
842
|
+
#
|
843
|
+
# @overload suggest_smart_replies(parent: nil, current_text_input: nil, latest_message: nil, context_size: nil)
|
844
|
+
# Pass arguments to `suggest_smart_replies` via keyword arguments. Note that at
|
845
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
846
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
847
|
+
#
|
848
|
+
# @param parent [::String]
|
849
|
+
# Required. The name of the participant to fetch suggestion for.
|
850
|
+
# Format: `projects/<Project ID>/locations/<Location
|
851
|
+
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
852
|
+
# @param current_text_input [::Google::Cloud::Dialogflow::V2::TextInput, ::Hash]
|
853
|
+
# The current natural language text segment to compile suggestion
|
854
|
+
# for. This provides a way for user to get follow up smart reply suggestion
|
855
|
+
# after a smart reply selection, without sending a text message.
|
856
|
+
# @param latest_message [::String]
|
857
|
+
# The name of the latest conversation message to compile suggestion
|
858
|
+
# for. If empty, it will be the latest message of the conversation.
|
859
|
+
#
|
860
|
+
# Format: `projects/<Project ID>/locations/<Location
|
861
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
862
|
+
# @param context_size [::Integer]
|
863
|
+
# Max number of messages prior to and including
|
864
|
+
# [latest_message] to use as context when compiling the
|
865
|
+
# suggestion. By default 20 and at most 50.
|
866
|
+
#
|
867
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
868
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
|
869
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
870
|
+
#
|
871
|
+
# @return [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
|
872
|
+
#
|
873
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
874
|
+
#
|
875
|
+
# @example Basic example
|
876
|
+
# require "google/cloud/dialogflow/v2"
|
877
|
+
#
|
878
|
+
# # Create a client object. The client can be reused for multiple calls.
|
879
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
880
|
+
#
|
881
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
882
|
+
# request = Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest.new
|
883
|
+
#
|
884
|
+
# # Call the suggest_smart_replies method.
|
885
|
+
# result = client.suggest_smart_replies request
|
886
|
+
#
|
887
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse.
|
888
|
+
# p result
|
889
|
+
#
|
890
|
+
def suggest_smart_replies request, options = nil
|
891
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
892
|
+
|
893
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest
|
894
|
+
|
895
|
+
# Converts hash and nil to an options object
|
896
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
897
|
+
|
898
|
+
# Customize the options with defaults
|
899
|
+
metadata = @config.rpcs.suggest_smart_replies.metadata.to_h
|
900
|
+
|
901
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
902
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
903
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
904
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
905
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
906
|
+
|
907
|
+
header_params = {}
|
908
|
+
if request.parent
|
909
|
+
header_params["parent"] = request.parent
|
910
|
+
end
|
911
|
+
|
912
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
913
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
914
|
+
|
915
|
+
options.apply_defaults timeout: @config.rpcs.suggest_smart_replies.timeout,
|
916
|
+
metadata: metadata,
|
917
|
+
retry_policy: @config.rpcs.suggest_smart_replies.retry_policy
|
918
|
+
|
919
|
+
options.apply_defaults timeout: @config.timeout,
|
920
|
+
metadata: @config.metadata,
|
921
|
+
retry_policy: @config.retry_policy
|
922
|
+
|
923
|
+
@participants_stub.call_rpc :suggest_smart_replies, request, options: options do |response, operation|
|
924
|
+
yield response, operation if block_given?
|
925
|
+
return response
|
926
|
+
end
|
927
|
+
rescue ::GRPC::BadStatus => e
|
928
|
+
raise ::Google::Cloud::Error.from_error(e)
|
929
|
+
end
|
930
|
+
|
829
931
|
##
|
830
932
|
# Configuration class for the Participants API.
|
831
933
|
#
|
@@ -996,6 +1098,11 @@ module Google
|
|
996
1098
|
# @return [::Gapic::Config::Method]
|
997
1099
|
#
|
998
1100
|
attr_reader :suggest_faq_answers
|
1101
|
+
##
|
1102
|
+
# RPC-specific configuration for `suggest_smart_replies`
|
1103
|
+
# @return [::Gapic::Config::Method]
|
1104
|
+
#
|
1105
|
+
attr_reader :suggest_smart_replies
|
999
1106
|
|
1000
1107
|
# @private
|
1001
1108
|
def initialize parent_rpcs = nil
|
@@ -1013,6 +1120,8 @@ module Google
|
|
1013
1120
|
@suggest_articles = ::Gapic::Config::Method.new suggest_articles_config
|
1014
1121
|
suggest_faq_answers_config = parent_rpcs.suggest_faq_answers if parent_rpcs.respond_to? :suggest_faq_answers
|
1015
1122
|
@suggest_faq_answers = ::Gapic::Config::Method.new suggest_faq_answers_config
|
1123
|
+
suggest_smart_replies_config = parent_rpcs.suggest_smart_replies if parent_rpcs.respond_to? :suggest_smart_replies
|
1124
|
+
@suggest_smart_replies = ::Gapic::Config::Method.new suggest_smart_replies_config
|
1016
1125
|
|
1017
1126
|
yield self if block_given?
|
1018
1127
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/webhook.proto
|
3
3
|
|
4
|
+
require 'google/api/annotations_pb'
|
4
5
|
require 'google/cloud/dialogflow/v2/context_pb'
|
5
6
|
require 'google/cloud/dialogflow/v2/intent_pb'
|
6
7
|
require 'google/cloud/dialogflow/v2/session_pb'
|
7
8
|
require 'google/cloud/dialogflow/v2/session_entity_type_pb'
|
8
9
|
require 'google/protobuf/struct_pb'
|
9
|
-
require 'google/api/annotations_pb'
|
10
10
|
require 'google/protobuf'
|
11
11
|
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -24,8 +24,8 @@ require "google/cloud/dialogflow/v2/session_entity_types"
|
|
24
24
|
require "google/cloud/dialogflow/v2/sessions"
|
25
25
|
require "google/cloud/dialogflow/v2/participants"
|
26
26
|
require "google/cloud/dialogflow/v2/answer_records"
|
27
|
-
require "google/cloud/dialogflow/v2/conversations"
|
28
27
|
require "google/cloud/dialogflow/v2/conversation_profiles"
|
28
|
+
require "google/cloud/dialogflow/v2/conversations"
|
29
29
|
require "google/cloud/dialogflow/v2/documents"
|
30
30
|
require "google/cloud/dialogflow/v2/fulfillments"
|
31
31
|
require "google/cloud/dialogflow/v2/environments"
|
@@ -243,6 +243,9 @@ module Google
|
|
243
243
|
# @!attribute [rw] conversation_model_config
|
244
244
|
# @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::ConversationModelConfig]
|
245
245
|
# Configs of custom conversation model.
|
246
|
+
# @!attribute [rw] conversation_process_config
|
247
|
+
# @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::ConversationProcessConfig]
|
248
|
+
# Configs for processing conversation.
|
246
249
|
class SuggestionFeatureConfig
|
247
250
|
include ::Google::Protobuf::MessageExts
|
248
251
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -387,6 +390,16 @@ module Google
|
|
387
390
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
391
|
end
|
389
392
|
|
393
|
+
# Config to process conversation.
|
394
|
+
# @!attribute [rw] recent_sentences_count
|
395
|
+
# @return [::Integer]
|
396
|
+
# Number of recent non-small-talk sentences to use as context for article
|
397
|
+
# and FAQ suggestion
|
398
|
+
class ConversationProcessConfig
|
399
|
+
include ::Google::Protobuf::MessageExts
|
400
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
401
|
+
end
|
402
|
+
|
390
403
|
# Configuration for analyses to run on each conversation message.
|
391
404
|
# @!attribute [rw] enable_entity_extraction
|
392
405
|
# @return [::Boolean]
|
@@ -218,6 +218,68 @@ module Google
|
|
218
218
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
219
219
|
end
|
220
220
|
|
221
|
+
# Request message for {::Google::Cloud::Dialogflow::V2::Documents::Client#import_documents Documents.ImportDocuments}.
|
222
|
+
# @!attribute [rw] parent
|
223
|
+
# @return [::String]
|
224
|
+
# Required. The knowledge base to import documents into.
|
225
|
+
# Format: `projects/<Project ID>/locations/<Location
|
226
|
+
# ID>/knowledgeBases/<Knowledge Base ID>`.
|
227
|
+
# @!attribute [rw] gcs_source
|
228
|
+
# @return [::Google::Cloud::Dialogflow::V2::GcsSources]
|
229
|
+
# The Google Cloud Storage location for the documents.
|
230
|
+
# The path can include a wildcard.
|
231
|
+
#
|
232
|
+
# These URIs may have the forms
|
233
|
+
# `gs://<bucket-name>/<object-name>`.
|
234
|
+
# `gs://<bucket-name>/<object-path>/*.<extension>`.
|
235
|
+
# @!attribute [rw] document_template
|
236
|
+
# @return [::Google::Cloud::Dialogflow::V2::ImportDocumentTemplate]
|
237
|
+
# Required. Document template used for importing all the documents.
|
238
|
+
# @!attribute [rw] import_gcs_custom_metadata
|
239
|
+
# @return [::Boolean]
|
240
|
+
# Whether to import custom metadata from Google Cloud Storage.
|
241
|
+
# Only valid when the document source is Google Cloud Storage URI.
|
242
|
+
class ImportDocumentsRequest
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
|
247
|
+
# The template used for importing documents.
|
248
|
+
# @!attribute [rw] mime_type
|
249
|
+
# @return [::String]
|
250
|
+
# Required. The MIME type of the document.
|
251
|
+
# @!attribute [rw] knowledge_types
|
252
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>]
|
253
|
+
# Required. The knowledge type of document content.
|
254
|
+
# @!attribute [rw] metadata
|
255
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
256
|
+
# Metadata for the document. The metadata supports arbitrary
|
257
|
+
# key-value pairs. Suggested use cases include storing a document's title,
|
258
|
+
# an external URL distinct from the document's content_uri, etc.
|
259
|
+
# The max size of a `key` or a `value` of the metadata is 1024 bytes.
|
260
|
+
class ImportDocumentTemplate
|
261
|
+
include ::Google::Protobuf::MessageExts
|
262
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
263
|
+
|
264
|
+
# @!attribute [rw] key
|
265
|
+
# @return [::String]
|
266
|
+
# @!attribute [rw] value
|
267
|
+
# @return [::String]
|
268
|
+
class MetadataEntry
|
269
|
+
include ::Google::Protobuf::MessageExts
|
270
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
# Response message for {::Google::Cloud::Dialogflow::V2::Documents::Client#import_documents Documents.ImportDocuments}.
|
275
|
+
# @!attribute [rw] warnings
|
276
|
+
# @return [::Array<::Google::Rpc::Status>]
|
277
|
+
# Includes details about skipped documents or any other warnings.
|
278
|
+
class ImportDocumentsResponse
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
|
221
283
|
# Request message for {::Google::Cloud::Dialogflow::V2::Documents::Client#delete_document Documents.DeleteDocument}.
|
222
284
|
# @!attribute [rw] name
|
223
285
|
# @return [::String]
|
@@ -295,6 +357,9 @@ module Google
|
|
295
357
|
# @!attribute [r] state
|
296
358
|
# @return [::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata::State]
|
297
359
|
# Output only. The current state of this operation.
|
360
|
+
# @!attribute [rw] knowledge_base
|
361
|
+
# @return [::String]
|
362
|
+
# The name of the knowledge base interacted with during the operation.
|
298
363
|
class KnowledgeOperationMetadata
|
299
364
|
include ::Google::Protobuf::MessageExts
|
300
365
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -21,6 +21,17 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module Dialogflow
|
23
23
|
module V2
|
24
|
+
# Google Cloud Storage location for the inputs.
|
25
|
+
# @!attribute [rw] uris
|
26
|
+
# @return [::Array<::String>]
|
27
|
+
# Required. Google Cloud Storage URIs for the inputs. A URI is of the form:
|
28
|
+
# gs://bucket/object-prefix-or-name
|
29
|
+
# Whether a prefix or name is used depends on the use case.
|
30
|
+
class GcsSources
|
31
|
+
include ::Google::Protobuf::MessageExts
|
32
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
33
|
+
end
|
34
|
+
|
24
35
|
# Google Cloud Storage location for the output.
|
25
36
|
# @!attribute [rw] uri
|
26
37
|
# @return [::String]
|
@@ -87,7 +87,7 @@ module Google
|
|
87
87
|
# Represents a message posted into a conversation.
|
88
88
|
# @!attribute [rw] name
|
89
89
|
# @return [::String]
|
90
|
-
# The unique identifier of the message.
|
90
|
+
# Optional. The unique identifier of the message.
|
91
91
|
# Format: `projects/<Project ID>/locations/<Location
|
92
92
|
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
93
93
|
# @!attribute [rw] content
|
@@ -106,10 +106,16 @@ module Google
|
|
106
106
|
# Output only. The role of the participant.
|
107
107
|
# @!attribute [r] create_time
|
108
108
|
# @return [::Google::Protobuf::Timestamp]
|
109
|
-
# Output only. The time when the message was created.
|
109
|
+
# Output only. The time when the message was created in Contact Center AI.
|
110
|
+
# @!attribute [rw] send_time
|
111
|
+
# @return [::Google::Protobuf::Timestamp]
|
112
|
+
# Optional. The time when the message was sent.
|
110
113
|
# @!attribute [r] message_annotation
|
111
114
|
# @return [::Google::Cloud::Dialogflow::V2::MessageAnnotation]
|
112
115
|
# Output only. The annotation for the message.
|
116
|
+
# @!attribute [r] sentiment_analysis
|
117
|
+
# @return [::Google::Cloud::Dialogflow::V2::SentimentAnalysisResult]
|
118
|
+
# Output only. The sentiment analysis result for the message.
|
113
119
|
class Message
|
114
120
|
include ::Google::Protobuf::MessageExts
|
115
121
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -282,14 +288,14 @@ module Google
|
|
282
288
|
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
283
289
|
# @!attribute [rw] latest_message
|
284
290
|
# @return [::String]
|
285
|
-
# The name of the latest conversation message to compile suggestion
|
291
|
+
# Optional. The name of the latest conversation message to compile suggestion
|
286
292
|
# for. If empty, it will be the latest message of the conversation.
|
287
293
|
#
|
288
294
|
# Format: `projects/<Project ID>/locations/<Location
|
289
295
|
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
290
296
|
# @!attribute [rw] context_size
|
291
297
|
# @return [::Integer]
|
292
|
-
# Max number of messages prior to and including
|
298
|
+
# Optional. Max number of messages prior to and including
|
293
299
|
# {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
|
294
300
|
# when compiling the suggestion. By default 20 and at most 50.
|
295
301
|
# @!attribute [rw] assist_query_params
|
@@ -331,14 +337,14 @@ module Google
|
|
331
337
|
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
332
338
|
# @!attribute [rw] latest_message
|
333
339
|
# @return [::String]
|
334
|
-
# The name of the latest conversation message to compile suggestion
|
340
|
+
# Optional. The name of the latest conversation message to compile suggestion
|
335
341
|
# for. If empty, it will be the latest message of the conversation.
|
336
342
|
#
|
337
343
|
# Format: `projects/<Project ID>/locations/<Location
|
338
344
|
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
339
345
|
# @!attribute [rw] context_size
|
340
346
|
# @return [::Integer]
|
341
|
-
# Max number of messages prior to and including
|
347
|
+
# Optional. Max number of messages prior to and including
|
342
348
|
# [latest_message] to use as context when compiling the
|
343
349
|
# suggestion. By default 20 and at most 50.
|
344
350
|
# @!attribute [rw] assist_query_params
|
@@ -372,6 +378,59 @@ module Google
|
|
372
378
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
379
|
end
|
374
380
|
|
381
|
+
# The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_smart_replies Participants.SuggestSmartReplies}.
|
382
|
+
# @!attribute [rw] parent
|
383
|
+
# @return [::String]
|
384
|
+
# Required. The name of the participant to fetch suggestion for.
|
385
|
+
# Format: `projects/<Project ID>/locations/<Location
|
386
|
+
# ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
|
387
|
+
# @!attribute [rw] current_text_input
|
388
|
+
# @return [::Google::Cloud::Dialogflow::V2::TextInput]
|
389
|
+
# The current natural language text segment to compile suggestion
|
390
|
+
# for. This provides a way for user to get follow up smart reply suggestion
|
391
|
+
# after a smart reply selection, without sending a text message.
|
392
|
+
# @!attribute [rw] latest_message
|
393
|
+
# @return [::String]
|
394
|
+
# The name of the latest conversation message to compile suggestion
|
395
|
+
# for. If empty, it will be the latest message of the conversation.
|
396
|
+
#
|
397
|
+
# Format: `projects/<Project ID>/locations/<Location
|
398
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
399
|
+
# @!attribute [rw] context_size
|
400
|
+
# @return [::Integer]
|
401
|
+
# Max number of messages prior to and including
|
402
|
+
# [latest_message] to use as context when compiling the
|
403
|
+
# suggestion. By default 20 and at most 50.
|
404
|
+
class SuggestSmartRepliesRequest
|
405
|
+
include ::Google::Protobuf::MessageExts
|
406
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
407
|
+
end
|
408
|
+
|
409
|
+
# The response message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_smart_replies Participants.SuggestSmartReplies}.
|
410
|
+
# @!attribute [r] smart_reply_answers
|
411
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::SmartReplyAnswer>]
|
412
|
+
# Output only. Multiple reply options provided by smart reply service. The
|
413
|
+
# order is based on the rank of the model prediction.
|
414
|
+
# The maximum number of the returned replies is set in SmartReplyConfig.
|
415
|
+
# @!attribute [rw] latest_message
|
416
|
+
# @return [::String]
|
417
|
+
# The name of the latest conversation message used to compile
|
418
|
+
# suggestion for.
|
419
|
+
#
|
420
|
+
# Format: `projects/<Project ID>/locations/<Location
|
421
|
+
# ID>/conversations/<Conversation ID>/messages/<Message ID>`.
|
422
|
+
# @!attribute [rw] context_size
|
423
|
+
# @return [::Integer]
|
424
|
+
# Number of messages prior to and including
|
425
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse#latest_message latest_message} to compile the
|
426
|
+
# suggestion. It may be smaller than the
|
427
|
+
# {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest#context_size SuggestSmartRepliesRequest.context_size} field in the request if there
|
428
|
+
# aren't that many messages in the conversation.
|
429
|
+
class SuggestSmartRepliesResponse
|
430
|
+
include ::Google::Protobuf::MessageExts
|
431
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
432
|
+
end
|
433
|
+
|
375
434
|
# Represents the natural language speech audio to be played to the end user.
|
376
435
|
# @!attribute [rw] config
|
377
436
|
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
@@ -496,6 +555,26 @@ module Google
|
|
496
555
|
end
|
497
556
|
end
|
498
557
|
|
558
|
+
# Represents a smart reply answer.
|
559
|
+
# @!attribute [rw] reply
|
560
|
+
# @return [::String]
|
561
|
+
# The content of the reply.
|
562
|
+
# @!attribute [rw] confidence
|
563
|
+
# @return [::Float]
|
564
|
+
# Smart reply confidence.
|
565
|
+
# The system's confidence score that this reply is a good match for
|
566
|
+
# this conversation, as a value from 0.0 (completely uncertain) to 1.0
|
567
|
+
# (completely certain).
|
568
|
+
# @!attribute [rw] answer_record
|
569
|
+
# @return [::String]
|
570
|
+
# The name of answer record, in the format of
|
571
|
+
# "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
|
572
|
+
# ID>"
|
573
|
+
class SmartReplyAnswer
|
574
|
+
include ::Google::Protobuf::MessageExts
|
575
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
576
|
+
end
|
577
|
+
|
499
578
|
# One response of different type of suggestion response which is used in
|
500
579
|
# the response of {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} and
|
501
580
|
# {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent}, as well as {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantEvent HumanAgentAssistantEvent}.
|
@@ -508,6 +587,9 @@ module Google
|
|
508
587
|
# @!attribute [rw] suggest_faq_answers_response
|
509
588
|
# @return [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
|
510
589
|
# SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
|
590
|
+
# @!attribute [rw] suggest_smart_replies_response
|
591
|
+
# @return [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
|
592
|
+
# SuggestSmartRepliesResponse if request is for SMART_REPLY.
|
511
593
|
class SuggestionResult
|
512
594
|
include ::Google::Protobuf::MessageExts
|
513
595
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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.
|
4
|
+
version: 0.14.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: 2022-01-
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
328
|
- !ruby/object:Gem::Version
|
329
329
|
version: '0'
|
330
330
|
requirements: []
|
331
|
-
rubygems_version: 3.3.
|
331
|
+
rubygems_version: 3.3.5
|
332
332
|
signing_key:
|
333
333
|
specification_version: 4
|
334
334
|
summary: API Client library for the Dialogflow V2 API
|