Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.
REST client for the GenerativeQuestionService service.
Service for managing LLM generated questions in search serving.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the GenerativeQuestionService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all GenerativeQuestionService clients ::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.configure do |config| config.timeout = 10.0 end
#batch_update_generative_question_configs
def batch_update_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
def batch_update_generative_question_configs(parent: nil, requests: nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
Allows management of multiple questions.
def batch_update_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
batch_update_generative_question_configs
via a request object, either of type
BatchUpdateGenerativeQuestionConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def batch_update_generative_question_configs(parent: nil, requests: nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
batch_update_generative_question_configs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Optional. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
- requests (::Array<::Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest, ::Hash>) — Required. The updates question configs.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsRequest.new # Call the batch_update_generative_question_configs method. result = client.batch_update_generative_question_configs request # The returned object is of type Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the GenerativeQuestionService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#get_generative_questions_feature_config
def get_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
def get_generative_questions_feature_config(catalog: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Manages overal generative question feature state -- enables toggling feature on and off.
def get_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
get_generative_questions_feature_config
via a request object, either of type
Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_generative_questions_feature_config(catalog: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
get_generative_questions_feature_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- catalog (::String) — Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest.new # Call the get_generative_questions_feature_config method. result = client.get_generative_questions_feature_config request # The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new GenerativeQuestionService REST client object.
- (config) — Configure the GenerativeQuestionService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_generative_question_configs
def list_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
def list_generative_question_configs(parent: nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
Returns all questions for a given catalog.
def list_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
list_generative_question_configs
via a request object, either of type
ListGenerativeQuestionConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_generative_question_configs(parent: nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
list_generative_question_configs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsRequest.new # Call the list_generative_question_configs method. result = client.list_generative_question_configs request # The returned object is of type Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse. p result
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_generative_question_config
def update_generative_question_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
def update_generative_question_config(generative_question_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
Allows management of individual questions.
def update_generative_question_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
update_generative_question_config
via a request object, either of type
UpdateGenerativeQuestionConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_generative_question_config(generative_question_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
update_generative_question_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- generative_question_config (::Google::Cloud::Retail::V2::GenerativeQuestionConfig, ::Hash) — Required. The question to update.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Indicates which fields in the provided
GenerativeQuestionConfig
to update. The following are NOT supported:
If not set or empty, all supported fields are updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Retail::V2::GenerativeQuestionConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest.new # Call the update_generative_question_config method. result = client.update_generative_question_config request # The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionConfig. p result
#update_generative_questions_feature_config
def update_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
def update_generative_questions_feature_config(generative_questions_feature_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Manages overal generative question feature state -- enables toggling feature on and off.
def update_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
update_generative_questions_feature_config
via a request object, either of type
UpdateGenerativeQuestionsFeatureConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Retail::V2::UpdateGenerativeQuestionsFeatureConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_generative_questions_feature_config(generative_questions_feature_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
update_generative_questions_feature_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- generative_questions_feature_config (::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig, ::Hash) — Required. The configuration managing the feature state.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Indicates which fields in the provided GenerativeQuestionsFeatureConfig to update. If not set or empty, all supported fields are updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/retail/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Retail::V2::UpdateGenerativeQuestionsFeatureConfigRequest.new # Call the update_generative_questions_feature_config method. result = client.update_generative_questions_feature_config request # The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig. p result