Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec
- 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
-
#answer_language_code ⇒ String
Language code for Answer.
-
#ignore_adversarial_query ⇒ Boolean
(also: #ignore_adversarial_query?)
Specifies whether to filter out adversarial queries.
-
#ignore_low_relevant_content ⇒ Boolean
(also: #ignore_low_relevant_content?)
Specifies whether to filter out queries that have low relevance.
-
#ignore_non_answer_seeking_query ⇒ Boolean
(also: #ignore_non_answer_seeking_query?)
Specifies whether to filter out queries that are not answer-seeking.
-
#include_citations ⇒ Boolean
(also: #include_citations?)
Specifies whether to include citation metadata in the answer.
-
#model_spec ⇒ Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec
Answer Generation Model specification.
-
#prompt_spec ⇒ Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec
Answer generation prompt specification.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec
Returns a new instance of GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec.
5998 5999 6000 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5998 def initialize(**args) update!(**args) end |
Instance Attribute Details
#answer_language_code ⇒ String
Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.
Corresponds to the JSON property answerLanguageCode
5947 5948 5949 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5947 def answer_language_code @answer_language_code end |
#ignore_adversarial_query ⇒ Boolean 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
5958 5959 5960 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5958 def ignore_adversarial_query @ignore_adversarial_query end |
#ignore_low_relevant_content ⇒ Boolean 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
5967 5968 5969 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5967 def ignore_low_relevant_content @ignore_low_relevant_content end |
#ignore_non_answer_seeking_query ⇒ Boolean 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
5978 5979 5980 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5978 def ignore_non_answer_seeking_query @ignore_non_answer_seeking_query end |
#include_citations ⇒ Boolean 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
5985 5986 5987 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5985 def include_citations @include_citations end |
#model_spec ⇒ Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec
Answer Generation Model specification.
Corresponds to the JSON property modelSpec
5991 5992 5993 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5991 def model_spec @model_spec end |
#prompt_spec ⇒ Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec
Answer generation prompt specification.
Corresponds to the JSON property promptSpec
5996 5997 5998 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 5996 def prompt_spec @prompt_spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6003 6004 6005 6006 6007 6008 6009 6010 6011 |
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 6003 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_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) @prompt_spec = args[:prompt_spec] if args.key?(:prompt_spec) end |