google-cloud-dataqna 0.8.0 → 0.8.2
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/.yardopts +1 -1
- data/README.md +2 -3
- data/lib/google/cloud/dataqna/version.rb +1 -1
- data/lib/google/cloud/dataqna.rb +25 -7
- data/lib/google-cloud-dataqna.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed7c88431073b014a551e5b464ca5871ac94b6200e205c27c14582b5e4fe3047
|
|
4
|
+
data.tar.gz: 2e713eeaf43e9ed47b3563abb89df24a0cc0db3ac3aeac92fd5d901ac9470a12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed7fcc32cff05a5c6aaef43c6febf31ffc85ebabccb5cb0aaeac480292233f5f1668d057a67a304cbc1bf41347bfc96e3e80d8a368b06d03ca6f1e74e58d0e4e
|
|
7
|
+
data.tar.gz: 03ac3638e510b656c28ecee8d08d4e602b28218caa2dd80bfe676eab256beb685a045cb7322d881c8cafbf067fd2c77ca7a09c8c7f5df41fc338cde7cd7689c5
|
data/.yardopts
CHANGED
data/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# Ruby Client for the
|
|
2
|
-
|
|
3
|
-
API Client library for the BigQuery Data QnA API
|
|
1
|
+
# Ruby Client for the Data QnA API
|
|
4
2
|
|
|
5
3
|
Data QnA is a natural language question and answer service for BigQuery data.
|
|
6
4
|
|
|
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-dataqna-v*`.
|
|
9
8
|
The gem `google-cloud-dataqna` is the main client library that brings the
|
data/lib/google/cloud/dataqna.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -55,9 +55,11 @@ module Google
|
|
|
55
55
|
# `version` parameter. If the AutoSuggestionService service is
|
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
|
57
57
|
# appropriate versioned client will be returned.
|
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
59
|
+
# the `transport` parameter.
|
|
58
60
|
#
|
|
59
61
|
# Raises an exception if the currently installed versioned client gem for the
|
|
60
|
-
# given API version does not support the AutoSuggestionService service.
|
|
62
|
+
# given API version does not support the given transport of the AutoSuggestionService service.
|
|
61
63
|
# You can determine whether the method will succeed by calling
|
|
62
64
|
# {Google::Cloud::DataQnA.auto_suggestion_service_available?}.
|
|
63
65
|
#
|
|
@@ -132,9 +134,10 @@ module Google
|
|
|
132
134
|
#
|
|
133
135
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
134
136
|
# Defaults to `:v1alpha`.
|
|
137
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
135
138
|
# @return [::Object] A client object for the specified version.
|
|
136
139
|
#
|
|
137
|
-
def self.auto_suggestion_service version: :v1alpha, &block
|
|
140
|
+
def self.auto_suggestion_service version: :v1alpha, transport: :grpc, &block
|
|
138
141
|
require "google/cloud/dataqna/#{version.to_s.downcase}"
|
|
139
142
|
|
|
140
143
|
package_name = Google::Cloud::DataQnA
|
|
@@ -142,6 +145,7 @@ module Google
|
|
|
142
145
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
143
146
|
.first
|
|
144
147
|
service_module = Google::Cloud::DataQnA.const_get(package_name).const_get(:AutoSuggestionService)
|
|
148
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
145
149
|
service_module.const_get(:Client).new(&block)
|
|
146
150
|
end
|
|
147
151
|
|
|
@@ -154,9 +158,10 @@ module Google
|
|
|
154
158
|
#
|
|
155
159
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
156
160
|
# Defaults to `:v1alpha`.
|
|
161
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
157
162
|
# @return [boolean] Whether the service is available.
|
|
158
163
|
#
|
|
159
|
-
def self.auto_suggestion_service_available? version: :v1alpha
|
|
164
|
+
def self.auto_suggestion_service_available? version: :v1alpha, transport: :grpc
|
|
160
165
|
require "google/cloud/dataqna/#{version.to_s.downcase}"
|
|
161
166
|
package_name = Google::Cloud::DataQnA
|
|
162
167
|
.constants
|
|
@@ -166,6 +171,10 @@ module Google
|
|
|
166
171
|
service_module = Google::Cloud::DataQnA.const_get package_name
|
|
167
172
|
return false unless service_module.const_defined? :AutoSuggestionService
|
|
168
173
|
service_module = service_module.const_get :AutoSuggestionService
|
|
174
|
+
if transport == :rest
|
|
175
|
+
return false unless service_module.const_defined? :Rest
|
|
176
|
+
service_module = service_module.const_get :Rest
|
|
177
|
+
end
|
|
169
178
|
service_module.const_defined? :Client
|
|
170
179
|
rescue ::LoadError
|
|
171
180
|
false
|
|
@@ -181,9 +190,11 @@ module Google
|
|
|
181
190
|
# `version` parameter. If the QuestionService service is
|
|
182
191
|
# supported by that API version, and the corresponding gem is available, the
|
|
183
192
|
# appropriate versioned client will be returned.
|
|
193
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
194
|
+
# the `transport` parameter.
|
|
184
195
|
#
|
|
185
196
|
# Raises an exception if the currently installed versioned client gem for the
|
|
186
|
-
# given API version does not support the QuestionService service.
|
|
197
|
+
# given API version does not support the given transport of the QuestionService service.
|
|
187
198
|
# You can determine whether the method will succeed by calling
|
|
188
199
|
# {Google::Cloud::DataQnA.question_service_available?}.
|
|
189
200
|
#
|
|
@@ -207,9 +218,10 @@ module Google
|
|
|
207
218
|
#
|
|
208
219
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
209
220
|
# Defaults to `:v1alpha`.
|
|
221
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
210
222
|
# @return [::Object] A client object for the specified version.
|
|
211
223
|
#
|
|
212
|
-
def self.question_service version: :v1alpha, &block
|
|
224
|
+
def self.question_service version: :v1alpha, transport: :grpc, &block
|
|
213
225
|
require "google/cloud/dataqna/#{version.to_s.downcase}"
|
|
214
226
|
|
|
215
227
|
package_name = Google::Cloud::DataQnA
|
|
@@ -217,6 +229,7 @@ module Google
|
|
|
217
229
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
218
230
|
.first
|
|
219
231
|
service_module = Google::Cloud::DataQnA.const_get(package_name).const_get(:QuestionService)
|
|
232
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
220
233
|
service_module.const_get(:Client).new(&block)
|
|
221
234
|
end
|
|
222
235
|
|
|
@@ -229,9 +242,10 @@ module Google
|
|
|
229
242
|
#
|
|
230
243
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
231
244
|
# Defaults to `:v1alpha`.
|
|
245
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
232
246
|
# @return [boolean] Whether the service is available.
|
|
233
247
|
#
|
|
234
|
-
def self.question_service_available? version: :v1alpha
|
|
248
|
+
def self.question_service_available? version: :v1alpha, transport: :grpc
|
|
235
249
|
require "google/cloud/dataqna/#{version.to_s.downcase}"
|
|
236
250
|
package_name = Google::Cloud::DataQnA
|
|
237
251
|
.constants
|
|
@@ -241,6 +255,10 @@ module Google
|
|
|
241
255
|
service_module = Google::Cloud::DataQnA.const_get package_name
|
|
242
256
|
return false unless service_module.const_defined? :QuestionService
|
|
243
257
|
service_module = service_module.const_get :QuestionService
|
|
258
|
+
if transport == :rest
|
|
259
|
+
return false unless service_module.const_defined? :Rest
|
|
260
|
+
service_module = service_module.const_get :Rest
|
|
261
|
+
end
|
|
244
262
|
service_module.const_defined? :Client
|
|
245
263
|
rescue ::LoadError
|
|
246
264
|
false
|
data/lib/google-cloud-dataqna.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-dataqna
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -77,5 +77,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
77
|
requirements: []
|
|
78
78
|
rubygems_version: 3.6.9
|
|
79
79
|
specification_version: 4
|
|
80
|
-
summary:
|
|
80
|
+
summary: Data QnA is a natural language question and answer service for BigQuery data.
|
|
81
81
|
test_files: []
|