Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.
REST client for the SearchTuningService service.
Service for search tuning.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the SearchTuningService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SearchTuningService clients ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the SearchTuningService 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)
#initialize
def initialize() { |config| ... } -> Client
Create a new SearchTuningService REST client object.
- (config) — Configure the SearchTuningService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_custom_models
def list_custom_models(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse
def list_custom_models(data_store: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse
Gets a list of all the custom models.
def list_custom_models(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse
list_custom_models
via a request object, either of type
ListCustomModelsRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest, ::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_custom_models(data_store: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse
list_custom_models
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).
-
data_store (::String) — Required. The resource name of the parent Data Store, such as
projects/*/locations/global/collections/default_collection/dataStores/default_data_store
. This field is used to identify the data store where to fetch the models from.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest.new # Call the list_custom_models method. result = client.list_custom_models request # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse. 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)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Operations
Get the associated client for long-running operations.
#train_custom_model
def train_custom_model(request, options = nil) -> ::Gapic::Operation
def train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil, model_id: nil) -> ::Gapic::Operation
Trains a custom model.
def train_custom_model(request, options = nil) -> ::Gapic::Operation
train_custom_model
via a request object, either of type
TrainCustomModelRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest, ::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 train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil, model_id: nil) -> ::Gapic::Operation
train_custom_model
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).
- gcs_training_input (::Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest::GcsTrainingInput, ::Hash) — Cloud Storage training input.
-
data_store (::String) — Required. The resource name of the Data Store, such as
projects/*/locations/global/collections/default_collection/dataStores/default_data_store
. This field is used to identify the data store where to train the models. -
model_type (::String) —
Model to be trained. Supported values are:
- search-tuning: Fine tuning the search system based on data provided.
- error_config (::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig, ::Hash) — The desired location of errors incurred during the data ingestion and training.
- model_id (::String) — If not provided, a UUID will be generated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::TrainCustomModelRequest.new # Call the train_custom_model method. result = client.train_custom_model request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)