Class GenerateGroundedContentRequest.GenerationSpec (0.51.0)

public static final class GenerateGroundedContentRequest.GenerationSpec extends GeneratedMessageV3 implements GenerateGroundedContentRequest.GenerationSpecOrBuilder

Content generation specification.

Protobuf type google.cloud.discoveryengine.v1.GenerateGroundedContentRequest.GenerationSpec

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > GenerateGroundedContentRequest.GenerationSpec

Static Fields

FREQUENCY_PENALTY_FIELD_NUMBER

public static final int FREQUENCY_PENALTY_FIELD_NUMBER
Field Value
Type Description
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

MAX_OUTPUT_TOKENS_FIELD_NUMBER

public static final int MAX_OUTPUT_TOKENS_FIELD_NUMBER
Field Value
Type Description
int

MODEL_ID_FIELD_NUMBER

public static final int MODEL_ID_FIELD_NUMBER
Field Value
Type Description
int

PRESENCE_PENALTY_FIELD_NUMBER

public static final int PRESENCE_PENALTY_FIELD_NUMBER
Field Value
Type Description
int

TEMPERATURE_FIELD_NUMBER

public static final int TEMPERATURE_FIELD_NUMBER
Field Value
Type Description
int

TOP_K_FIELD_NUMBER

public static final int TOP_K_FIELD_NUMBER
Field Value
Type Description
int

TOP_P_FIELD_NUMBER

public static final int TOP_P_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static GenerateGroundedContentRequest.GenerationSpec getDefaultInstance()
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static GenerateGroundedContentRequest.GenerationSpec.Builder newBuilder()
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder

newBuilder(GenerateGroundedContentRequest.GenerationSpec prototype)

public static GenerateGroundedContentRequest.GenerationSpec.Builder newBuilder(GenerateGroundedContentRequest.GenerationSpec prototype)
Parameter
Name Description
prototype GenerateGroundedContentRequest.GenerationSpec
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder

parseDelimitedFrom(InputStream input)

public static GenerateGroundedContentRequest.GenerationSpec parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest.GenerationSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<GenerateGroundedContentRequest.GenerationSpec> parser()
Returns
Type Description
Parser<GenerationSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public GenerateGroundedContentRequest.GenerationSpec getDefaultInstanceForType()
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec

getFrequencyPenalty()

public float getFrequencyPenalty()

If specified, custom value for frequency penalty will be used.

optional float frequency_penalty = 8;

Returns
Type Description
float

The frequencyPenalty.

getLanguageCode()

public String getLanguageCode()

Language code for content. Use language tags defined by BCP47.

string language_code = 2;

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Language code for content. Use language tags defined by BCP47.

string language_code = 2;

Returns
Type Description
ByteString

The bytes for languageCode.

getMaxOutputTokens()

public int getMaxOutputTokens()

If specified, custom value for max output tokens will be used.

optional int32 max_output_tokens = 10;

Returns
Type Description
int

The maxOutputTokens.

getModelId()

public String getModelId()

Specifies which Vertex model id to use for generation.

string model_id = 3;

Returns
Type Description
String

The modelId.

getModelIdBytes()

public ByteString getModelIdBytes()

Specifies which Vertex model id to use for generation.

string model_id = 3;

Returns
Type Description
ByteString

The bytes for modelId.

getParserForType()

public Parser<GenerateGroundedContentRequest.GenerationSpec> getParserForType()
Returns
Type Description
Parser<GenerationSpec>
Overrides

getPresencePenalty()

public float getPresencePenalty()

If specified, custom value for presence penalty will be used.

optional float presence_penalty = 9;

Returns
Type Description
float

The presencePenalty.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTemperature()

public float getTemperature()

If specified, custom value for the temperature will be used.

optional float temperature = 4;

Returns
Type Description
float

The temperature.

getTopK()

public int getTopK()

If specified, custom value for top-k sampling will be used.

optional int32 top_k = 7;

Returns
Type Description
int

The topK.

getTopP()

public float getTopP()

If specified, custom value for nucleus sampling will be used.

optional float top_p = 5;

Returns
Type Description
float

The topP.

hasFrequencyPenalty()

public boolean hasFrequencyPenalty()

If specified, custom value for frequency penalty will be used.

optional float frequency_penalty = 8;

Returns
Type Description
boolean

Whether the frequencyPenalty field is set.

hasMaxOutputTokens()

public boolean hasMaxOutputTokens()

If specified, custom value for max output tokens will be used.

optional int32 max_output_tokens = 10;

Returns
Type Description
boolean

Whether the maxOutputTokens field is set.

hasPresencePenalty()

public boolean hasPresencePenalty()

If specified, custom value for presence penalty will be used.

optional float presence_penalty = 9;

Returns
Type Description
boolean

Whether the presencePenalty field is set.

hasTemperature()

public boolean hasTemperature()

If specified, custom value for the temperature will be used.

optional float temperature = 4;

Returns
Type Description
boolean

Whether the temperature field is set.

hasTopK()

public boolean hasTopK()

If specified, custom value for top-k sampling will be used.

optional int32 top_k = 7;

Returns
Type Description
boolean

Whether the topK field is set.

hasTopP()

public boolean hasTopP()

If specified, custom value for nucleus sampling will be used.

optional float top_p = 5;

Returns
Type Description
boolean

Whether the topP field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public GenerateGroundedContentRequest.GenerationSpec.Builder newBuilderForType()
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected GenerateGroundedContentRequest.GenerationSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public GenerateGroundedContentRequest.GenerationSpec.Builder toBuilder()
Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException