Class Generator.ModelParameter (0.65.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
TypeDescription
int

TEMPERATURE_FIELD_NUMBER

public static final int TEMPERATURE_FIELD_NUMBER
Field Value
TypeDescription
int

TOP_K_FIELD_NUMBER

public static final int TOP_K_FIELD_NUMBER
Field Value
TypeDescription
int

TOP_P_FIELD_NUMBER

public static final int TOP_P_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Generator.ModelParameter getDefaultInstance()
Returns
TypeDescription
Generator.ModelParameter

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Generator.ModelParameter.Builder newBuilder()
Returns
TypeDescription
Generator.ModelParameter.Builder

newBuilder(Generator.ModelParameter )

public static Generator.ModelParameter.Builder newBuilder(Generator.ModelParameter )
Parameter
NameDescription
Generator.ModelParameter
Returns
TypeDescription
Generator.ModelParameter.Builder

parseDelimitedFrom(InputStream input)

public static Generator.ModelParameter parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Generator.ModelParameter parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Generator.ModelParameter parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Generator.ModelParameter parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Generator.ModelParameter parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Generator.ModelParameter parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Generator.ModelParameter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Generator.ModelParameter
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Generator.ModelParameter getDefaultInstanceForType()
Returns
TypeDescription
Generator.ModelParameter

getMaxDecodeSteps()

public int getMaxDecodeSteps()

The maximum number of tokens to generate.

optional int32 max_decode_steps = 2;

Returns
TypeDescription
int

The maxDecodeSteps.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
float

The topP.

hasMaxDecodeSteps()

public boolean hasMaxDecodeSteps()

The maximum number of tokens to generate.

optional int32 max_decode_steps = 2;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the topP field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Generator.ModelParameter.Builder newBuilderForType()
Returns
TypeDescription
Generator.ModelParameter.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Generator.ModelParameter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Generator.ModelParameter.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Generator.ModelParameter.Builder toBuilder()
Returns
TypeDescription
Generator.ModelParameter.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException