Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Request message for ConversationalSearchService.AnswerQuery method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest

Returns a new instance of GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest.



4484
4485
4486
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4484

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#answer_generation_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec

Answer generation specification. Corresponds to the JSON property answerGenerationSpec



4404
4405
4406
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4404

def answer_generation_spec
  @answer_generation_spec
end

#asynchronous_modeBoolean Also known as: asynchronous_mode?

Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService. GetSession method. Corresponds to the JSON property asynchronousMode

Returns:

  • (Boolean)


4414
4415
4416
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4414

def asynchronous_mode
  @asynchronous_mode
end

#grounding_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestGroundingSpec

Grounding specification. Corresponds to the JSON property groundingSpec



4420
4421
4422
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4420

def grounding_spec
  @grounding_spec
end

#queryGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaQuery

Defines a user inputed query. Corresponds to the JSON property query



4425
4426
4427
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4425

def query
  @query
end

#query_understanding_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec

Query understanding specification. Corresponds to the JSON property queryUnderstandingSpec



4430
4431
4432
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4430

def query_understanding_spec
  @query_understanding_spec
end

Related questions specification. Corresponds to the JSON property relatedQuestionsSpec



4435
4436
4437
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4435

def related_questions_spec
  @related_questions_spec
end

#safety_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec

Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.

  1. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. Corresponds to the JSON property safetySpec


4443
4444
4445
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4443

def safety_spec
  @safety_spec
end

#search_specGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec

Search specification. Corresponds to the JSON property searchSpec



4448
4449
4450
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4448

def search_spec
  @search_spec
end

#sessionString

The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol - as session ID. A new ID will be automatically generated and assigned. Corresponds to the JSON property session

Returns:

  • (String)


4456
4457
4458
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4456

def session
  @session
end

#user_labelsHash<String,String>

The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See Google Cloud Document for more details. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


4471
4472
4473
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4471

def user_labels
  @user_labels
end

#user_pseudo_idString

A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as unknown_visitor. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property userPseudoId

Returns:

  • (String)


4482
4483
4484
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4482

def user_pseudo_id
  @user_pseudo_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4489

def update!(**args)
  @answer_generation_spec = args[:answer_generation_spec] if args.key?(:answer_generation_spec)
  @asynchronous_mode = args[:asynchronous_mode] if args.key?(:asynchronous_mode)
  @grounding_spec = args[:grounding_spec] if args.key?(:grounding_spec)
  @query = args[:query] if args.key?(:query)
  @query_understanding_spec = args[:query_understanding_spec] if args.key?(:query_understanding_spec)
  @related_questions_spec = args[:related_questions_spec] if args.key?(:related_questions_spec)
  @safety_spec = args[:safety_spec] if args.key?(:safety_spec)
  @search_spec = args[:search_spec] if args.key?(:search_spec)
  @session = args[:session] if args.key?(:session)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
  @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
end