Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec

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

Overview

Answer generation specification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec

Returns a new instance of GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec.



19577
19578
19579
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19577

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

Instance Attribute Details

#answer_language_codeString

Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature. Corresponds to the JSON property answerLanguageCode

Returns:

  • (String)


19507
19508
19509
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19507

def answer_language_code
  @answer_language_code
end

#ignore_adversarial_queryBoolean Also known as: ignore_adversarial_query?

Specifies whether to filter out adversarial queries. The default value is false. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to true, we skip generating answers for adversarial queries and return fallback messages instead. Corresponds to the JSON property ignoreAdversarialQuery

Returns:

  • (Boolean)


19518
19519
19520
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19518

def ignore_adversarial_query
  @ignore_adversarial_query
end

#ignore_jail_breaking_queryBoolean Also known as: ignore_jail_breaking_query?

Optional. Specifies whether to filter out jail-breaking queries. The default value is false. Google employs search-query classification to detect jail- breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to true, we skip generating summaries for jail-breaking queries and return fallback messages instead. Corresponds to the JSON property ignoreJailBreakingQuery

Returns:

  • (Boolean)


19531
19532
19533
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19531

def ignore_jail_breaking_query
  @ignore_jail_breaking_query
end

#ignore_low_relevant_contentBoolean Also known as: ignore_low_relevant_content?

Specifies whether to filter out queries that have low relevance. If this field is set to false, all search results are used regardless of relevance to generate answers. If set to true or unset, the behavior will be determined automatically by the service. Corresponds to the JSON property ignoreLowRelevantContent

Returns:

  • (Boolean)


19540
19541
19542
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19540

def ignore_low_relevant_content
  @ignore_low_relevant_content
end

#ignore_non_answer_seeking_queryBoolean Also known as: ignore_non_answer_seeking_query?

Specifies whether to filter out queries that are not answer-seeking. The default value is false. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead. Corresponds to the JSON property ignoreNonAnswerSeekingQuery

Returns:

  • (Boolean)


19551
19552
19553
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19551

def ignore_non_answer_seeking_query
  @ignore_non_answer_seeking_query
end

#include_citationsBoolean Also known as: include_citations?

Specifies whether to include citation metadata in the answer. The default value is false. Corresponds to the JSON property includeCitations

Returns:

  • (Boolean)


19558
19559
19560
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19558

def include_citations
  @include_citations
end

#model_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec

Answer Generation Model specification. Corresponds to the JSON property modelSpec



19564
19565
19566
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19564

def model_spec
  @model_spec
end

#multimodal_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecMultimodalSpec

Multimodal specification: Will return an image from specified source. If multiple sources are specified, the pick is a quality based decision. Corresponds to the JSON property multimodalSpec



19570
19571
19572
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19570

def multimodal_spec
  @multimodal_spec
end

#prompt_specGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec

Answer generation prompt specification. Corresponds to the JSON property promptSpec



19575
19576
19577
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19575

def prompt_spec
  @prompt_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 19582

def update!(**args)
  @answer_language_code = args[:answer_language_code] if args.key?(:answer_language_code)
  @ignore_adversarial_query = args[:ignore_adversarial_query] if args.key?(:ignore_adversarial_query)
  @ignore_jail_breaking_query = args[:ignore_jail_breaking_query] if args.key?(:ignore_jail_breaking_query)
  @ignore_low_relevant_content = args[:ignore_low_relevant_content] if args.key?(:ignore_low_relevant_content)
  @ignore_non_answer_seeking_query = args[:ignore_non_answer_seeking_query] if args.key?(:ignore_non_answer_seeking_query)
  @include_citations = args[:include_citations] if args.key?(:include_citations)
  @model_spec = args[:model_spec] if args.key?(:model_spec)
  @multimodal_spec = args[:multimodal_spec] if args.key?(:multimodal_spec)
  @prompt_spec = args[:prompt_spec] if args.key?(:prompt_spec)
end