Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec
- 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
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_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::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec
Answer Generation Model specification.
-
#prompt_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec
Answer generation prompt specification.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec
constructor
A new instance of GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec
Returns a new instance of GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec.
1931 1932 1933 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1931 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
1889 1890 1891 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1889 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
1900 1901 1902 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1900 def ignore_adversarial_query @ignore_adversarial_query 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
1911 1912 1913 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1911 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
1918 1919 1920 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1918 def include_citations @include_citations end |
#model_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec
Answer Generation Model specification.
Corresponds to the JSON property modelSpec
1924 1925 1926 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1924 def model_spec @model_spec end |
#prompt_spec ⇒ Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec
Answer generation prompt specification.
Corresponds to the JSON property promptSpec
1929 1930 1931 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1929 def prompt_spec @prompt_spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1936 1937 1938 1939 1940 1941 1942 1943 |
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 1936 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_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 |