google-cloud-dialogflow 1.15.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/lib/google/cloud/dialogflow/version.rb +1 -1
- data/lib/google/cloud/dialogflow.rb +70 -0
- metadata +5 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65993cc4334737d597a17123e762afc1e5c6081bd7c20a3c38699bed7a37757f
|
|
4
|
+
data.tar.gz: 9c41f06bc03d51fcec5996d0a39676ecd7f3b22e66791afe1f7a54ea7750ca04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df33487169e223c59ce876d3376e26adeb9b599efcb9da87f4142d1abba423210e2347cd2a099a9ba5c15bc5b628c4ba81ede52f20533e796ac75dfaa1ecd5ae
|
|
7
|
+
data.tar.gz: 87a299cfdbd3d761bd546b16a1a245f63cece22682f0e470d06ca4eb9c54db4bfd6805c77446c39855c87db8f8a1cd553976ef0656b39df7dbad378e7ca912b3
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Ruby Client for the Dialogflow API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).
|
|
4
4
|
|
|
5
|
-
Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. This client is for Dialogflow ES, providing the standard agent type suitable for small and simple agents.
|
|
6
5
|
|
|
7
6
|
Actual client classes for the various versions of this API are defined in
|
|
8
7
|
_versioned_ client gems, with names of the form `google-cloud-dialogflow-v*`.
|
|
@@ -18,7 +17,7 @@ themselves can be found in the client library documentation for the versioned
|
|
|
18
17
|
client gems:
|
|
19
18
|
[google-cloud-dialogflow-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest).
|
|
20
19
|
|
|
21
|
-
See also the [Product Documentation](https://cloud.google.com/dialogflow)
|
|
20
|
+
See also the [Product Documentation](https://docs.cloud.google.com/dialogflow/docs)
|
|
22
21
|
for more usage information.
|
|
23
22
|
|
|
24
23
|
## Quick Start
|
|
@@ -261,6 +261,76 @@ module Google
|
|
|
261
261
|
false
|
|
262
262
|
end
|
|
263
263
|
|
|
264
|
+
##
|
|
265
|
+
# Create a new client object for CompanionAgents.
|
|
266
|
+
#
|
|
267
|
+
# By default, this returns an instance of
|
|
268
|
+
# [Google::Cloud::Dialogflow::V2::CompanionAgents::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-CompanionAgents-Client)
|
|
269
|
+
# for a gRPC client for version V2 of the API.
|
|
270
|
+
# However, you can specify a different API version by passing it in the
|
|
271
|
+
# `version` parameter. If the CompanionAgents service is
|
|
272
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
273
|
+
# appropriate versioned client will be returned.
|
|
274
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
275
|
+
# the `transport` parameter.
|
|
276
|
+
#
|
|
277
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
278
|
+
# given API version does not support the given transport of the CompanionAgents service.
|
|
279
|
+
# You can determine whether the method will succeed by calling
|
|
280
|
+
# {Google::Cloud::Dialogflow.companion_agents_available?}.
|
|
281
|
+
#
|
|
282
|
+
# ## About CompanionAgents
|
|
283
|
+
#
|
|
284
|
+
# Service for managing companion agents.
|
|
285
|
+
#
|
|
286
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
287
|
+
# Defaults to `:v2`.
|
|
288
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
289
|
+
# @return [::Object] A client object for the specified version.
|
|
290
|
+
#
|
|
291
|
+
def self.companion_agents version: :v2, transport: :grpc, &block
|
|
292
|
+
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
|
293
|
+
|
|
294
|
+
package_name = Google::Cloud::Dialogflow
|
|
295
|
+
.constants
|
|
296
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
297
|
+
.first
|
|
298
|
+
service_module = Google::Cloud::Dialogflow.const_get(package_name).const_get(:CompanionAgents)
|
|
299
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
300
|
+
service_module.const_get(:Client).new(&block)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
##
|
|
304
|
+
# Determines whether the CompanionAgents service is supported by the current client.
|
|
305
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Dialogflow.companion_agents}.
|
|
306
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
307
|
+
# API version does not exist or does not support the CompanionAgents service,
|
|
308
|
+
# or if the versioned client gem needs an update to support the CompanionAgents service.
|
|
309
|
+
#
|
|
310
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
311
|
+
# Defaults to `:v2`.
|
|
312
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
313
|
+
# @return [boolean] Whether the service is available.
|
|
314
|
+
#
|
|
315
|
+
def self.companion_agents_available? version: :v2, transport: :grpc
|
|
316
|
+
require "google/cloud/dialogflow/#{version.to_s.downcase}"
|
|
317
|
+
package_name = Google::Cloud::Dialogflow
|
|
318
|
+
.constants
|
|
319
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
320
|
+
.first
|
|
321
|
+
return false unless package_name
|
|
322
|
+
service_module = Google::Cloud::Dialogflow.const_get package_name
|
|
323
|
+
return false unless service_module.const_defined? :CompanionAgents
|
|
324
|
+
service_module = service_module.const_get :CompanionAgents
|
|
325
|
+
if transport == :rest
|
|
326
|
+
return false unless service_module.const_defined? :Rest
|
|
327
|
+
service_module = service_module.const_get :Rest
|
|
328
|
+
end
|
|
329
|
+
service_module.const_defined? :Client
|
|
330
|
+
rescue ::LoadError
|
|
331
|
+
false
|
|
332
|
+
end
|
|
333
|
+
|
|
264
334
|
##
|
|
265
335
|
# Create a new client object for Contexts.
|
|
266
336
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-dialogflow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -43,12 +43,8 @@ dependencies:
|
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: 2.a
|
|
46
|
-
description:
|
|
47
|
-
|
|
48
|
-
popular messaging platforms, and IoT devices. You can use it to build interfaces
|
|
49
|
-
(such as chatbots and conversational IVR) that enable natural and rich interactions
|
|
50
|
-
between your users and your business. This client is for Dialogflow ES, providing
|
|
51
|
-
the standard agent type suitable for small and simple agents.
|
|
46
|
+
description: Builds conversational interfaces (for example, chatbots, and voice-powered
|
|
47
|
+
apps and devices).
|
|
52
48
|
email: googleapis-packages@google.com
|
|
53
49
|
executables: []
|
|
54
50
|
extensions: []
|
|
@@ -82,5 +78,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
78
|
requirements: []
|
|
83
79
|
rubygems_version: 3.6.9
|
|
84
80
|
specification_version: 4
|
|
85
|
-
summary:
|
|
81
|
+
summary: Builds conversational interfaces (for example, chatbots, and voice-powered
|
|
82
|
+
apps and devices).
|
|
86
83
|
test_files: []
|