public static final class AnswerQueryRequest.AnswerGenerationSpec extends GeneratedMessageV3 implements AnswerQueryRequest.AnswerGenerationSpecOrBuilder
Answer generation specification.
Protobuf type
google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ANSWER_LANGUAGE_CODE_FIELD_NUMBER
public static final int ANSWER_LANGUAGE_CODE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER
public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER
public static final int IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER
public static final int IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
INCLUDE_CITATIONS_FIELD_NUMBER
public static final int INCLUDE_CITATIONS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MODEL_SPEC_FIELD_NUMBER
public static final int MODEL_SPEC_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PROMPT_SPEC_FIELD_NUMBER
public static final int PROMPT_SPEC_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static AnswerQueryRequest.AnswerGenerationSpec getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilder()
newBuilder(AnswerQueryRequest.AnswerGenerationSpec prototype)
public static AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilder(AnswerQueryRequest.AnswerGenerationSpec prototype)
public static AnswerQueryRequest.AnswerGenerationSpec parseDelimitedFrom(InputStream input)
public static AnswerQueryRequest.AnswerGenerationSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(CodedInputStream input)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(InputStream input)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<AnswerQueryRequest.AnswerGenerationSpec> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAnswerLanguageCode()
public String getAnswerLanguageCode()
Language code for Answer. Use language tags defined by
BCP47.
Note: This is an experimental feature.
string answer_language_code = 4;
Returns |
Type |
Description |
String |
The answerLanguageCode.
|
getAnswerLanguageCodeBytes()
public ByteString getAnswerLanguageCodeBytes()
Language code for Answer. Use language tags defined by
BCP47.
Note: This is an experimental feature.
string answer_language_code = 4;
Returns |
Type |
Description |
ByteString |
The bytes for answerLanguageCode.
|
getDefaultInstanceForType()
public AnswerQueryRequest.AnswerGenerationSpec getDefaultInstanceForType()
getIgnoreAdversarialQuery()
public boolean getIgnoreAdversarialQuery()
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.
bool ignore_adversarial_query = 5;
Returns |
Type |
Description |
boolean |
The ignoreAdversarialQuery.
|
getIgnoreLowRelevantContent()
public boolean getIgnoreLowRelevantContent()
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.
optional bool ignore_low_relevant_content = 7;
Returns |
Type |
Description |
boolean |
The ignoreLowRelevantContent.
|
getIgnoreNonAnswerSeekingQuery()
public boolean getIgnoreNonAnswerSeekingQuery()
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.
bool ignore_non_answer_seeking_query = 6;
Returns |
Type |
Description |
boolean |
The ignoreNonAnswerSeekingQuery.
|
getIncludeCitations()
public boolean getIncludeCitations()
Specifies whether to include citation metadata in the answer. The default
value is false
.
bool include_citations = 3;
Returns |
Type |
Description |
boolean |
The includeCitations.
|
getModelSpec()
public AnswerQueryRequest.AnswerGenerationSpec.ModelSpec getModelSpec()
Answer generation model specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;
getModelSpecOrBuilder()
public AnswerQueryRequest.AnswerGenerationSpec.ModelSpecOrBuilder getModelSpecOrBuilder()
Answer generation model specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;
getParserForType()
public Parser<AnswerQueryRequest.AnswerGenerationSpec> getParserForType()
Overrides
getPromptSpec()
public AnswerQueryRequest.AnswerGenerationSpec.PromptSpec getPromptSpec()
Answer generation prompt specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;
getPromptSpecOrBuilder()
public AnswerQueryRequest.AnswerGenerationSpec.PromptSpecOrBuilder getPromptSpecOrBuilder()
Answer generation prompt specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
hasIgnoreLowRelevantContent()
public boolean hasIgnoreLowRelevantContent()
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.
optional bool ignore_low_relevant_content = 7;
Returns |
Type |
Description |
boolean |
Whether the ignoreLowRelevantContent field is set.
|
hasModelSpec()
public boolean hasModelSpec()
Answer generation model specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;
Returns |
Type |
Description |
boolean |
Whether the modelSpec field is set.
|
hasPromptSpec()
public boolean hasPromptSpec()
Answer generation prompt specification.
.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;
Returns |
Type |
Description |
boolean |
Whether the promptSpec field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public AnswerQueryRequest.AnswerGenerationSpec.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides