Class Generator.ModelParameter (0.66.0)

public static final class Generator.ModelParameter extends GeneratedMessageV3 implements Generator.ModelParameterOrBuilder

Parameters to be passed to the LLM. If not set, default values will be used.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter

Static Fields

MAX_DECODE_STEPS_FIELD_NUMBER

public static final int MAX_DECODE_STEPS_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 Generator.ModelParameter getDefaultInstance()
Returns
Type Description
Generator.ModelParameter

getDescriptor()

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

newBuilder()

public static Generator.ModelParameter.Builder newBuilder()
Returns
Type Description
Generator.ModelParameter.Builder

newBuilder(Generator.ModelParameter prototype)

public static Generator.ModelParameter.Builder newBuilder(Generator.ModelParameter prototype)
Parameter
Name Description
prototype Generator.ModelParameter
Returns
Type Description
Generator.ModelParameter.Builder

parseDelimitedFrom(InputStream input)

public static Generator.ModelParameter parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Generator.ModelParameter
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static Generator.ModelParameter parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Generator.ModelParameter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static Generator.ModelParameter parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Generator.ModelParameter
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static Generator.ModelParameter parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Generator.ModelParameter
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static Generator.ModelParameter parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Generator.ModelParameter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Generator.ModelParameter> parser()
Returns
Type Description
Parser<ModelParameter>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public Generator.ModelParameter getDefaultInstanceForType()
Returns
Type Description
Generator.ModelParameter

getMaxDecodeSteps()

public int getMaxDecodeSteps()

The maximum number of tokens to generate.

optional int32 max_decode_steps = 2;

Returns
Type Description
int

The maxDecodeSteps.

getParserForType()

public Parser<Generator.ModelParameter> getParserForType()
Returns
Type Description
Parser<ModelParameter>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTemperature()

public float getTemperature()

The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.

optional float temperature = 1;

Returns
Type Description
float

The temperature.

getTopK()

public int getTopK()

If set, the sampling process in each step is limited to the top_k tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.

optional int32 top_k = 4;

Returns
Type Description
int

The topK.

getTopP()

public float getTopP()

If set, only the tokens comprising the top top_p probability mass are considered. If both top_p and top_k are set, top_p will be used for further refining candidates selected with top_k. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.

optional float top_p = 3;

Returns
Type Description
float

The topP.

hasMaxDecodeSteps()

public boolean hasMaxDecodeSteps()

The maximum number of tokens to generate.

optional int32 max_decode_steps = 2;

Returns
Type Description
boolean

Whether the maxDecodeSteps field is set.

hasTemperature()

public boolean hasTemperature()

The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.

optional float temperature = 1;

Returns
Type Description
boolean

Whether the temperature field is set.

hasTopK()

public boolean hasTopK()

If set, the sampling process in each step is limited to the top_k tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.

optional int32 top_k = 4;

Returns
Type Description
boolean

Whether the topK field is set.

hasTopP()

public boolean hasTopP()

If set, only the tokens comprising the top top_p probability mass are considered. If both top_p and top_k are set, top_p will be used for further refining candidates selected with top_k. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.

optional float top_p = 3;

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 Generator.ModelParameter.Builder newBuilderForType()
Returns
Type Description
Generator.ModelParameter.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Generator.ModelParameter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Generator.ModelParameter.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public Generator.ModelParameter.Builder toBuilder()
Returns
Type Description
Generator.ModelParameter.Builder

writeTo(CodedOutputStream output)

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