google-cloud-dialogflow 0.4.0 → 0.5.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.rb +31 -7
- data/lib/google/cloud/dialogflow/v2.rb +55 -7
- data/lib/google/cloud/dialogflow/v2/agent_pb.rb +26 -1
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +7 -3
- data/lib/google/cloud/dialogflow/v2/agents_client.rb +101 -5
- data/lib/google/cloud/dialogflow/v2/agents_client_config.json +10 -0
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/context_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts_client.rb +9 -3
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +57 -2
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +7 -7
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +8 -8
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +6 -6
- data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +16 -13
- data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +20 -11
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents_client.rb +17 -8
- data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +9 -3
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/sessions_client.rb +8 -2
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/version.rb +1 -1
- metadata +4 -4
@@ -217,7 +217,7 @@ module Google
|
|
217
217
|
# @!attribute [rw] prompts
|
218
218
|
# @return [Array<String>]
|
219
219
|
# Optional. The collection of prompts that the agent can present to the
|
220
|
-
# user in order to collect value for the parameter.
|
220
|
+
# user in order to collect a value for the parameter.
|
221
221
|
# @!attribute [rw] is_list
|
222
222
|
# @return [true, false]
|
223
223
|
# Optional. Indicates whether the parameter represents a list of values.
|
@@ -580,7 +580,7 @@ module Google
|
|
580
580
|
# Optional. The language to list training phrases, parameters and rich
|
581
581
|
# messages for. If not specified, the agent's default language is used.
|
582
582
|
# [Many
|
583
|
-
# languages](https://cloud.google.com/dialogflow
|
583
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
584
584
|
# are supported. Note: languages must be enabled in the agent before they can
|
585
585
|
# be used.
|
586
586
|
# @!attribute [rw] intent_view
|
@@ -616,7 +616,7 @@ module Google
|
|
616
616
|
# Optional. The language to retrieve training phrases, parameters and rich
|
617
617
|
# messages for. If not specified, the agent's default language is used.
|
618
618
|
# [Many
|
619
|
-
# languages](https://cloud.google.com/dialogflow
|
619
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
620
620
|
# are supported. Note: languages must be enabled in the agent before they can
|
621
621
|
# be used.
|
622
622
|
# @!attribute [rw] intent_view
|
@@ -637,7 +637,7 @@ module Google
|
|
637
637
|
# Optional. The language of training phrases, parameters and rich messages
|
638
638
|
# defined in `intent`. If not specified, the agent's default language is
|
639
639
|
# used. [Many
|
640
|
-
# languages](https://cloud.google.com/dialogflow
|
640
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
641
641
|
# are supported. Note: languages must be enabled in the agent before they can
|
642
642
|
# be used.
|
643
643
|
# @!attribute [rw] intent_view
|
@@ -654,7 +654,7 @@ module Google
|
|
654
654
|
# Optional. The language of training phrases, parameters and rich messages
|
655
655
|
# defined in `intent`. If not specified, the agent's default language is
|
656
656
|
# used. [Many
|
657
|
-
# languages](https://cloud.google.com/dialogflow
|
657
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
658
658
|
# are supported. Note: languages must be enabled in the agent before they can
|
659
659
|
# be used.
|
660
660
|
# @!attribute [rw] update_mask
|
@@ -691,7 +691,7 @@ module Google
|
|
691
691
|
# Optional. The language of training phrases, parameters and rich messages
|
692
692
|
# defined in `intents`. If not specified, the agent's default language is
|
693
693
|
# used. [Many
|
694
|
-
# languages](https://cloud.google.com/dialogflow
|
694
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
695
695
|
# are supported. Note: languages must be enabled in the agent before they can
|
696
696
|
# be used.
|
697
697
|
# @!attribute [rw] update_mask
|
@@ -143,7 +143,7 @@ module Google
|
|
143
143
|
# @return [String]
|
144
144
|
# The language that was triggered during intent detection.
|
145
145
|
# See [Language
|
146
|
-
# Support](https://cloud.google.com/dialogflow
|
146
|
+
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
147
147
|
# for a list of the currently supported language codes.
|
148
148
|
# @!attribute [rw] speech_recognition_confidence
|
149
149
|
# @return [Float]
|
@@ -228,7 +228,7 @@ module Google
|
|
228
228
|
# @return [String]
|
229
229
|
# Required. The name of the session the query is sent to.
|
230
230
|
# Format of the session name:
|
231
|
-
# `projects/<Project ID>/agent/sessions/<Session ID>`. It
|
231
|
+
# `projects/<Project ID>/agent/sessions/<Session ID>`. It's up to the API
|
232
232
|
# caller to choose an appropriate `Session ID`. It can be a random number or
|
233
233
|
# some type of user identifier (preferably hashed). The length of the session
|
234
234
|
# ID must not exceed 36 characters.
|
@@ -295,11 +295,14 @@ module Google
|
|
295
295
|
# @!attribute [rw] output_audio
|
296
296
|
# @return [String]
|
297
297
|
# The audio data bytes encoded as specified in the request.
|
298
|
+
# Note: The output audio is generated based on the values of default platform
|
299
|
+
# text responses found in the `query_result.fulfillment_messages` field. If
|
300
|
+
# multiple default text responses exist, they will be concatenated when
|
301
|
+
# generating audio. If no default platform text responses exist, the
|
302
|
+
# generated audio content will be empty.
|
298
303
|
# @!attribute [rw] output_audio_config
|
299
304
|
# @return [Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
300
|
-
#
|
301
|
-
# field is populated from the agent-level speech synthesizer configuration,
|
302
|
-
# if enabled.
|
305
|
+
# The config used by the speech synthesizer to generate the output audio.
|
303
306
|
class StreamingDetectIntentResponse; end
|
304
307
|
|
305
308
|
# Contains a speech recognition result corresponding to a portion of the audio
|
@@ -367,12 +370,12 @@ module Google
|
|
367
370
|
TRANSCRIPT = 1
|
368
371
|
|
369
372
|
# Event indicates that the server has detected the end of the user's speech
|
370
|
-
# utterance and expects no additional
|
371
|
-
# not process additional audio (although it may subsequently return
|
372
|
-
#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
373
|
+
# utterance and expects no additional inputs.
|
374
|
+
# Therefore, the server will not process additional audio (although it may subsequently return additional results). The
|
375
|
+
# client should stop sending additional audio data, half-close the gRPC
|
376
|
+
# connection, and wait for any additional results until the server closes
|
377
|
+
# the gRPC connection. This message is only sent if `single_utterance` was
|
378
|
+
# set to `true`, and is not used otherwise.
|
376
379
|
END_OF_SINGLE_UTTERANCE = 2
|
377
380
|
end
|
378
381
|
end
|
@@ -385,7 +388,7 @@ module Google
|
|
385
388
|
# @!attribute [rw] language_code
|
386
389
|
# @return [String]
|
387
390
|
# Required. The language of this conversational query. See [Language
|
388
|
-
# Support](https://cloud.google.com/dialogflow
|
391
|
+
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
389
392
|
# for a list of the currently supported language codes. Note that queries in
|
390
393
|
# the same session do not necessarily need to specify the same language.
|
391
394
|
class TextInput; end
|
@@ -404,7 +407,7 @@ module Google
|
|
404
407
|
# @!attribute [rw] language_code
|
405
408
|
# @return [String]
|
406
409
|
# Required. The language of this query. See [Language
|
407
|
-
# Support](https://cloud.google.com/dialogflow
|
410
|
+
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
408
411
|
# for a list of the currently supported language codes. Note that queries in
|
409
412
|
# the same session do not necessarily need to specify the same language.
|
410
413
|
class EventInput; end
|
@@ -8,7 +8,7 @@ require 'google/api/annotations_pb'
|
|
8
8
|
require 'google/longrunning/operations_pb'
|
9
9
|
require 'google/protobuf/empty_pb'
|
10
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
-
require 'google/
|
11
|
+
require 'google/api/client_pb'
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_message "google.cloud.dialogflow.v2.EntityType" do
|
14
14
|
optional :name, :string, 1
|
@@ -53,7 +53,7 @@ module Google
|
|
53
53
|
#
|
54
54
|
# For more information about entity types, see the
|
55
55
|
# [Dialogflow
|
56
|
-
# documentation](https://cloud.google.com/dialogflow
|
56
|
+
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
57
57
|
class Service
|
58
58
|
|
59
59
|
include GRPC::GenericService
|
@@ -62,7 +62,7 @@ module Google
|
|
62
62
|
#
|
63
63
|
# For more information about entity types, see the
|
64
64
|
# [Dialogflow
|
65
|
-
# documentation](https://cloud.google.com/dialogflow
|
65
|
+
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
66
66
|
#
|
67
67
|
# @!attribute [r] entity_types_stub
|
68
68
|
# @return [Google::Cloud::Dialogflow::V2::EntityTypes::Stub]
|
@@ -161,6 +161,10 @@ module Google
|
|
161
161
|
# The default timeout, in seconds, for calls made through this client.
|
162
162
|
# @param metadata [Hash]
|
163
163
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
164
|
+
# @param service_address [String]
|
165
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
166
|
+
# @param service_port [Integer]
|
167
|
+
# Override for the service port, or `nil` to leave as the default.
|
164
168
|
# @param exception_transformer [Proc]
|
165
169
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
166
170
|
# custom error handling.
|
@@ -170,6 +174,8 @@ module Google
|
|
170
174
|
client_config: {},
|
171
175
|
timeout: DEFAULT_TIMEOUT,
|
172
176
|
metadata: nil,
|
177
|
+
service_address: nil,
|
178
|
+
service_port: nil,
|
173
179
|
exception_transformer: nil,
|
174
180
|
lib_name: nil,
|
175
181
|
lib_version: ""
|
@@ -187,7 +193,10 @@ module Google
|
|
187
193
|
client_config: client_config,
|
188
194
|
timeout: timeout,
|
189
195
|
lib_name: lib_name,
|
196
|
+
service_address: service_address,
|
197
|
+
service_port: service_port,
|
190
198
|
lib_version: lib_version,
|
199
|
+
metadata: metadata,
|
191
200
|
)
|
192
201
|
|
193
202
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
@@ -233,8 +242,8 @@ module Google
|
|
233
242
|
end
|
234
243
|
|
235
244
|
# Allow overriding the service path/port in subclasses.
|
236
|
-
service_path = self.class::SERVICE_ADDRESS
|
237
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
245
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
246
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
238
247
|
interceptors = self.class::GRPC_INTERCEPTORS
|
239
248
|
@entity_types_stub = Google::Gax::Grpc.create_stub(
|
240
249
|
service_path,
|
@@ -340,7 +349,7 @@ module Google
|
|
340
349
|
# Optional. The language to list entity synonyms for. If not specified,
|
341
350
|
# the agent's default language is used.
|
342
351
|
# [Many
|
343
|
-
# languages](https://cloud.google.com/dialogflow
|
352
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
344
353
|
# are supported. Note: languages must be enabled in the agent before they can
|
345
354
|
# be used.
|
346
355
|
# @param page_size [Integer]
|
@@ -404,7 +413,7 @@ module Google
|
|
404
413
|
# Optional. The language to retrieve entity synonyms for. If not specified,
|
405
414
|
# the agent's default language is used.
|
406
415
|
# [Many
|
407
|
-
# languages](https://cloud.google.com/dialogflow
|
416
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
408
417
|
# are supported. Note: languages must be enabled in the agent before they can
|
409
418
|
# be used.
|
410
419
|
# @param options [Google::Gax::CallOptions]
|
@@ -448,7 +457,7 @@ module Google
|
|
448
457
|
# Optional. The language of entity synonyms defined in `entity_type`. If not
|
449
458
|
# specified, the agent's default language is used.
|
450
459
|
# [Many
|
451
|
-
# languages](https://cloud.google.com/dialogflow
|
460
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
452
461
|
# are supported. Note: languages must be enabled in the agent before they can
|
453
462
|
# be used.
|
454
463
|
# @param options [Google::Gax::CallOptions]
|
@@ -494,7 +503,7 @@ module Google
|
|
494
503
|
# Optional. The language of entity synonyms defined in `entity_type`. If not
|
495
504
|
# specified, the agent's default language is used.
|
496
505
|
# [Many
|
497
|
-
# languages](https://cloud.google.com/dialogflow
|
506
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
498
507
|
# are supported. Note: languages must be enabled in the agent before they can
|
499
508
|
# be used.
|
500
509
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
@@ -584,7 +593,7 @@ module Google
|
|
584
593
|
# Optional. The language of entity synonyms defined in `entity_types`. If not
|
585
594
|
# specified, the agent's default language is used.
|
586
595
|
# [Many
|
587
|
-
# languages](https://cloud.google.com/dialogflow
|
596
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
588
597
|
# are supported. Note: languages must be enabled in the agent before they can
|
589
598
|
# be used.
|
590
599
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
@@ -741,7 +750,7 @@ module Google
|
|
741
750
|
# Optional. The language of entity synonyms defined in `entities`. If not
|
742
751
|
# specified, the agent's default language is used.
|
743
752
|
# [Many
|
744
|
-
# languages](https://cloud.google.com/dialogflow
|
753
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
745
754
|
# are supported. Note: languages must be enabled in the agent before they can
|
746
755
|
# be used.
|
747
756
|
# @param options [Google::Gax::CallOptions]
|
@@ -824,7 +833,7 @@ module Google
|
|
824
833
|
# Optional. The language of entity synonyms defined in `entities`. If not
|
825
834
|
# specified, the agent's default language is used.
|
826
835
|
# [Many
|
827
|
-
# languages](https://cloud.google.com/dialogflow
|
836
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
828
837
|
# are supported. Note: languages must be enabled in the agent before they can
|
829
838
|
# be used.
|
830
839
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
@@ -911,7 +920,7 @@ module Google
|
|
911
920
|
# Optional. The language of entity synonyms defined in `entities`. If not
|
912
921
|
# specified, the agent's default language is used.
|
913
922
|
# [Many
|
914
|
-
# languages](https://cloud.google.com/dialogflow
|
923
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
915
924
|
# are supported. Note: languages must be enabled in the agent before they can
|
916
925
|
# be used.
|
917
926
|
# @param options [Google::Gax::CallOptions]
|
@@ -5,12 +5,14 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
require 'google/cloud/dialogflow/v2/audio_config_pb'
|
8
9
|
require 'google/cloud/dialogflow/v2/context_pb'
|
9
10
|
require 'google/longrunning/operations_pb'
|
10
11
|
require 'google/protobuf/duration_pb'
|
11
12
|
require 'google/protobuf/empty_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
require 'google/protobuf/struct_pb'
|
15
|
+
require 'google/api/client_pb'
|
14
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
17
|
add_message "google.cloud.dialogflow.v2.Intent" do
|
16
18
|
optional :name, :string, 1
|
@@ -57,7 +57,7 @@ module Google
|
|
57
57
|
#
|
58
58
|
# For more information about intents, see the
|
59
59
|
# [Dialogflow
|
60
|
-
# documentation](https://cloud.google.com/dialogflow
|
60
|
+
# documentation](https://cloud.google.com/dialogflow/docs/intents-overview).
|
61
61
|
class Service
|
62
62
|
|
63
63
|
include GRPC::GenericService
|
@@ -66,7 +66,7 @@ module Google
|
|
66
66
|
#
|
67
67
|
# For more information about intents, see the
|
68
68
|
# [Dialogflow
|
69
|
-
# documentation](https://cloud.google.com/dialogflow
|
69
|
+
# documentation](https://cloud.google.com/dialogflow/docs/intents-overview).
|
70
70
|
#
|
71
71
|
# @!attribute [r] intents_stub
|
72
72
|
# @return [Google::Cloud::Dialogflow::V2::Intents::Stub]
|
@@ -182,6 +182,10 @@ module Google
|
|
182
182
|
# The default timeout, in seconds, for calls made through this client.
|
183
183
|
# @param metadata [Hash]
|
184
184
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
185
|
+
# @param service_address [String]
|
186
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
187
|
+
# @param service_port [Integer]
|
188
|
+
# Override for the service port, or `nil` to leave as the default.
|
185
189
|
# @param exception_transformer [Proc]
|
186
190
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
187
191
|
# custom error handling.
|
@@ -191,6 +195,8 @@ module Google
|
|
191
195
|
client_config: {},
|
192
196
|
timeout: DEFAULT_TIMEOUT,
|
193
197
|
metadata: nil,
|
198
|
+
service_address: nil,
|
199
|
+
service_port: nil,
|
194
200
|
exception_transformer: nil,
|
195
201
|
lib_name: nil,
|
196
202
|
lib_version: ""
|
@@ -208,7 +214,10 @@ module Google
|
|
208
214
|
client_config: client_config,
|
209
215
|
timeout: timeout,
|
210
216
|
lib_name: lib_name,
|
217
|
+
service_address: service_address,
|
218
|
+
service_port: service_port,
|
211
219
|
lib_version: lib_version,
|
220
|
+
metadata: metadata,
|
212
221
|
)
|
213
222
|
|
214
223
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
@@ -254,8 +263,8 @@ module Google
|
|
254
263
|
end
|
255
264
|
|
256
265
|
# Allow overriding the service path/port in subclasses.
|
257
|
-
service_path = self.class::SERVICE_ADDRESS
|
258
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
266
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
267
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
259
268
|
interceptors = self.class::GRPC_INTERCEPTORS
|
260
269
|
@intents_stub = Google::Gax::Grpc.create_stub(
|
261
270
|
service_path,
|
@@ -337,7 +346,7 @@ module Google
|
|
337
346
|
# Optional. The language to list training phrases, parameters and rich
|
338
347
|
# messages for. If not specified, the agent's default language is used.
|
339
348
|
# [Many
|
340
|
-
# languages](https://cloud.google.com/dialogflow
|
349
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
341
350
|
# are supported. Note: languages must be enabled in the agent before they can
|
342
351
|
# be used.
|
343
352
|
# @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
|
@@ -405,7 +414,7 @@ module Google
|
|
405
414
|
# Optional. The language to retrieve training phrases, parameters and rich
|
406
415
|
# messages for. If not specified, the agent's default language is used.
|
407
416
|
# [Many
|
408
|
-
# languages](https://cloud.google.com/dialogflow
|
417
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
409
418
|
# are supported. Note: languages must be enabled in the agent before they can
|
410
419
|
# be used.
|
411
420
|
# @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
|
@@ -453,7 +462,7 @@ module Google
|
|
453
462
|
# Optional. The language of training phrases, parameters and rich messages
|
454
463
|
# defined in `intent`. If not specified, the agent's default language is
|
455
464
|
# used. [Many
|
456
|
-
# languages](https://cloud.google.com/dialogflow
|
465
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
457
466
|
# are supported. Note: languages must be enabled in the agent before they can
|
458
467
|
# be used.
|
459
468
|
# @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
|
@@ -503,7 +512,7 @@ module Google
|
|
503
512
|
# Optional. The language of training phrases, parameters and rich messages
|
504
513
|
# defined in `intent`. If not specified, the agent's default language is
|
505
514
|
# used. [Many
|
506
|
-
# languages](https://cloud.google.com/dialogflow
|
515
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
507
516
|
# are supported. Note: languages must be enabled in the agent before they can
|
508
517
|
# be used.
|
509
518
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
@@ -592,7 +601,7 @@ module Google
|
|
592
601
|
# Optional. The language of training phrases, parameters and rich messages
|
593
602
|
# defined in `intents`. If not specified, the agent's default language is
|
594
603
|
# used. [Many
|
595
|
-
# languages](https://cloud.google.com/dialogflow
|
604
|
+
# languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
596
605
|
# are supported. Note: languages must be enabled in the agent before they can
|
597
606
|
# be used.
|
598
607
|
# @param intent_batch_uri [String]
|
@@ -8,6 +8,7 @@ require 'google/api/annotations_pb'
|
|
8
8
|
require 'google/cloud/dialogflow/v2/entity_type_pb'
|
9
9
|
require 'google/protobuf/empty_pb'
|
10
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/api/client_pb'
|
11
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
13
|
add_message "google.cloud.dialogflow.v2.SessionEntityType" do
|
13
14
|
optional :name, :string, 1
|
@@ -38,7 +38,7 @@ module Google
|
|
38
38
|
#
|
39
39
|
# For more information about entity types, see the
|
40
40
|
# [Dialogflow
|
41
|
-
# documentation](https://cloud.google.com/dialogflow
|
41
|
+
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
42
42
|
class Service
|
43
43
|
|
44
44
|
include GRPC::GenericService
|
@@ -45,7 +45,7 @@ module Google
|
|
45
45
|
#
|
46
46
|
# For more information about entity types, see the
|
47
47
|
# [Dialogflow
|
48
|
-
# documentation](https://cloud.google.com/dialogflow
|
48
|
+
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
49
49
|
#
|
50
50
|
# @!attribute [r] session_entity_types_stub
|
51
51
|
# @return [Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub]
|
@@ -143,6 +143,10 @@ module Google
|
|
143
143
|
# The default timeout, in seconds, for calls made through this client.
|
144
144
|
# @param metadata [Hash]
|
145
145
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
146
|
+
# @param service_address [String]
|
147
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
148
|
+
# @param service_port [Integer]
|
149
|
+
# Override for the service port, or `nil` to leave as the default.
|
146
150
|
# @param exception_transformer [Proc]
|
147
151
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
148
152
|
# custom error handling.
|
@@ -152,6 +156,8 @@ module Google
|
|
152
156
|
client_config: {},
|
153
157
|
timeout: DEFAULT_TIMEOUT,
|
154
158
|
metadata: nil,
|
159
|
+
service_address: nil,
|
160
|
+
service_port: nil,
|
155
161
|
exception_transformer: nil,
|
156
162
|
lib_name: nil,
|
157
163
|
lib_version: ""
|
@@ -206,8 +212,8 @@ module Google
|
|
206
212
|
end
|
207
213
|
|
208
214
|
# Allow overriding the service path/port in subclasses.
|
209
|
-
service_path = self.class::SERVICE_ADDRESS
|
210
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
215
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
216
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
211
217
|
interceptors = self.class::GRPC_INTERCEPTORS
|
212
218
|
@session_entity_types_stub = Google::Gax::Grpc.create_stub(
|
213
219
|
service_path,
|
@@ -9,9 +9,11 @@ require 'google/cloud/dialogflow/v2/audio_config_pb'
|
|
9
9
|
require 'google/cloud/dialogflow/v2/context_pb'
|
10
10
|
require 'google/cloud/dialogflow/v2/intent_pb'
|
11
11
|
require 'google/cloud/dialogflow/v2/session_entity_type_pb'
|
12
|
+
require 'google/protobuf/duration_pb'
|
12
13
|
require 'google/protobuf/struct_pb'
|
13
14
|
require 'google/rpc/status_pb'
|
14
15
|
require 'google/type/latlng_pb'
|
16
|
+
require 'google/api/client_pb'
|
15
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
18
|
add_message "google.cloud.dialogflow.v2.DetectIntentRequest" do
|
17
19
|
optional :session, :string, 1
|