Class Generator.ModelParameter.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
com.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter.Builder
- All Implemented Interfaces:
Generator.ModelParameterOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Generator.ModelParameter
public static final class Generator.ModelParameter.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The maximum number of tokens to generate.The temperature used for sampling.If set, the sampling process in each step is limited to the top_k tokens with highest probabilities.If set, only the tokens comprising the top top_p probability mass are considered.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintThe maximum number of tokens to generate.floatThe temperature used for sampling.intgetTopK()If set, the sampling process in each step is limited to the top_k tokens with highest probabilities.floatgetTopP()If set, only the tokens comprising the top top_p probability mass are considered.booleanThe maximum number of tokens to generate.booleanThe temperature used for sampling.booleanhasTopK()If set, the sampling process in each step is limited to the top_k tokens with highest probabilities.booleanhasTopP()If set, only the tokens comprising the top top_p probability mass are considered.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setMaxDecodeSteps(int value) The maximum number of tokens to generate.setTemperature(float value) The temperature used for sampling.setTopK(int value) If set, the sampling process in each step is limited to the top_k tokens with highest probabilities.setTopP(float value) If set, only the tokens comprising the top top_p probability mass are considered.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generator.ModelParameter.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
-
mergeFrom
public Generator.ModelParameter.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generator.ModelParameter.Builder>- Throws:
IOException
-
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;- Specified by:
hasTemperaturein interfaceGenerator.ModelParameterOrBuilder- Returns:
- Whether the temperature field is set.
-
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;- Specified by:
getTemperaturein interfaceGenerator.ModelParameterOrBuilder- Returns:
- The temperature.
-
setTemperature
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;- Parameters:
value- The temperature to set.- Returns:
- This builder for chaining.
-
clearTemperature
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:
- This builder for chaining.
-
hasMaxDecodeSteps
public boolean hasMaxDecodeSteps()The maximum number of tokens to generate.
optional int32 max_decode_steps = 2;- Specified by:
hasMaxDecodeStepsin interfaceGenerator.ModelParameterOrBuilder- Returns:
- Whether the maxDecodeSteps field is set.
-
getMaxDecodeSteps
public int getMaxDecodeSteps()The maximum number of tokens to generate.
optional int32 max_decode_steps = 2;- Specified by:
getMaxDecodeStepsin interfaceGenerator.ModelParameterOrBuilder- Returns:
- The maxDecodeSteps.
-
setMaxDecodeSteps
The maximum number of tokens to generate.
optional int32 max_decode_steps = 2;- Parameters:
value- The maxDecodeSteps to set.- Returns:
- This builder for chaining.
-
clearMaxDecodeSteps
The maximum number of tokens to generate.
optional int32 max_decode_steps = 2;- Returns:
- This builder for chaining.
-
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;- Specified by:
hasTopPin interfaceGenerator.ModelParameterOrBuilder- Returns:
- Whether the topP field is set.
-
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;- Specified by:
getTopPin interfaceGenerator.ModelParameterOrBuilder- Returns:
- The topP.
-
setTopP
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;- Parameters:
value- The topP to set.- Returns:
- This builder for chaining.
-
clearTopP
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:
- This builder for chaining.
-
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;- Specified by:
hasTopKin interfaceGenerator.ModelParameterOrBuilder- Returns:
- Whether the topK field is set.
-
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;- Specified by:
getTopKin interfaceGenerator.ModelParameterOrBuilder- Returns:
- The topK.
-
setTopK
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;- Parameters:
value- The topK to set.- Returns:
- This builder for chaining.
-
clearTopK
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:
- This builder for chaining.
-