Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequest

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

Overview

Request message for ConversationalSearchService.AnswerQuery method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1AnswerQueryRequest

Returns a new instance of GoogleCloudDiscoveryengineV1AnswerQueryRequest.



473
474
475
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 473

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

Instance Attribute Details

#answer_generation_specGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec

Answer generation specification. Corresponds to the JSON property answerGenerationSpec



417
418
419
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 417

def answer_generation_spec
  @answer_generation_spec
end

#asynchronous_modeBoolean Also known as: asynchronous_mode?

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)


426
427
428
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 426

def asynchronous_mode
  @asynchronous_mode
end

#queryGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Query

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



432
433
434
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 432

def query
  @query
end

#query_understanding_specGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpec

Query understanding specification. Corresponds to the JSON property queryUnderstandingSpec



437
438
439
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 437

def query_understanding_spec
  @query_understanding_spec
end

Related questions specification. Corresponds to the JSON property relatedQuestionsSpec



442
443
444
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 442

def related_questions_spec
  @related_questions_spec
end

#safety_specGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec

Safety specification. Corresponds to the JSON property safetySpec



447
448
449
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 447

def safety_spec
  @safety_spec
end

#search_specGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpec

Search specification. Corresponds to the JSON property searchSpec



452
453
454
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 452

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)


460
461
462
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 460

def session
  @session
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)


471
472
473
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 471

def user_pseudo_id
  @user_pseudo_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



478
479
480
481
482
483
484
485
486
487
488
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 478

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)
  @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_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
end