public static final class Api.Parameters.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder> implements Api.ParametersOrBuilder
api.Parameters| Modifier and Type | Method and Description |
|---|---|
Api.Parameters.Builder |
addAllStop(Iterable<String> values)
repeated string stop = 13; |
Api.Parameters.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Api.Parameters.Builder |
addStop(String value)
repeated string stop = 13; |
Api.Parameters.Builder |
addStopBytes(com.google.protobuf.ByteString value)
repeated string stop = 13; |
Api.Parameters |
build() |
Api.Parameters |
buildPartial() |
Api.Parameters.Builder |
clear() |
Api.Parameters.Builder |
clearDoSample()
Whether or not to use sampling, use greedy decoding otherwise.
|
Api.Parameters.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Api.Parameters.Builder |
clearFrequencyPenalty()
Number between -2.0 and 2.0.
|
Api.Parameters.Builder |
clearLogprobs()
optional int64 logprobs = 12; |
Api.Parameters.Builder |
clearMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in
the prompt
|
Api.Parameters.Builder |
clearMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this
limit, it will be truncated as prompt[-max_prompt_tokens:]
|
Api.Parameters.Builder |
clearMaxTokens()
The maximum number of tokens to generate in the char completion.
|
Api.Parameters.Builder |
clearMinNewTokens()
the minimum number of tokens to generate
|
Api.Parameters.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Api.Parameters.Builder |
clearPresencePenalty()
Number between -2.0 and 2.0.
|
Api.Parameters.Builder |
clearRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
|
Api.Parameters.Builder |
clearStop()
repeated string stop = 13; |
Api.Parameters.Builder |
clearTemperature()
Exponential scaling output probability distribution
|
Api.Parameters.Builder |
clearTopK()
The number of highest probability vocabulary tokens to keep for
top-k-filtering.
|
Api.Parameters.Builder |
clearTopP()
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability
mass
|
Api.Parameters.Builder |
clone() |
Api.Parameters |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getDoSample()
Whether or not to use sampling, use greedy decoding otherwise.
|
float |
getFrequencyPenalty()
Number between -2.0 and 2.0.
|
long |
getLogprobs()
optional int64 logprobs = 12; |
long |
getMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in
the prompt
|
long |
getMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this
limit, it will be truncated as prompt[-max_prompt_tokens:]
|
long |
getMaxTokens()
The maximum number of tokens to generate in the char completion.
|
long |
getMinNewTokens()
the minimum number of tokens to generate
|
float |
getPresencePenalty()
Number between -2.0 and 2.0.
|
float |
getRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
|
String |
getStop(int index)
repeated string stop = 13; |
com.google.protobuf.ByteString |
getStopBytes(int index)
repeated string stop = 13; |
int |
getStopCount()
repeated string stop = 13; |
com.google.protobuf.ProtocolStringList |
getStopList()
repeated string stop = 13; |
float |
getTemperature()
Exponential scaling output probability distribution
|
long |
getTopK()
The number of highest probability vocabulary tokens to keep for
top-k-filtering.
|
float |
getTopP()
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability
mass
|
boolean |
hasDoSample()
Whether or not to use sampling, use greedy decoding otherwise.
|
boolean |
hasFrequencyPenalty()
Number between -2.0 and 2.0.
|
boolean |
hasLogprobs()
optional int64 logprobs = 12; |
boolean |
hasMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in
the prompt
|
boolean |
hasMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this
limit, it will be truncated as prompt[-max_prompt_tokens:]
|
boolean |
hasMaxTokens()
The maximum number of tokens to generate in the char completion.
|
boolean |
hasMinNewTokens()
the minimum number of tokens to generate
|
boolean |
hasPresencePenalty()
Number between -2.0 and 2.0.
|
boolean |
hasRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
|
boolean |
hasTemperature()
Exponential scaling output probability distribution
|
boolean |
hasTopK()
The number of highest probability vocabulary tokens to keep for
top-k-filtering.
|
boolean |
hasTopP()
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability
mass
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Api.Parameters.Builder |
mergeFrom(Api.Parameters other) |
Api.Parameters.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Api.Parameters.Builder |
mergeFrom(com.google.protobuf.Message other) |
Api.Parameters.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Api.Parameters.Builder |
setDoSample(boolean value)
Whether or not to use sampling, use greedy decoding otherwise.
|
Api.Parameters.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Api.Parameters.Builder |
setFrequencyPenalty(float value)
Number between -2.0 and 2.0.
|
Api.Parameters.Builder |
setLogprobs(long value)
optional int64 logprobs = 12; |
Api.Parameters.Builder |
setMaxNewTokens(long value)
The maximum number of tokens to generate, ignoring the number of tokens in
the prompt
|
Api.Parameters.Builder |
setMaxPromptTokens(long value)
the maximum number of prompt tokens, if prompt tokens length over this
limit, it will be truncated as prompt[-max_prompt_tokens:]
|
Api.Parameters.Builder |
setMaxTokens(long value)
The maximum number of tokens to generate in the char completion.
|
Api.Parameters.Builder |
setMinNewTokens(long value)
the minimum number of tokens to generate
|
Api.Parameters.Builder |
setPresencePenalty(float value)
Number between -2.0 and 2.0.
|
Api.Parameters.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Api.Parameters.Builder |
setRepetitionPenalty(float value)
The parameter for repetition penalty, from [1.0, 2.0]
|
Api.Parameters.Builder |
setStop(int index,
String value)
repeated string stop = 13; |
Api.Parameters.Builder |
setTemperature(float value)
Exponential scaling output probability distribution
|
Api.Parameters.Builder |
setTopK(long value)
The number of highest probability vocabulary tokens to keep for
top-k-filtering.
|
Api.Parameters.Builder |
setTopP(float value)
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability
mass
|
Api.Parameters.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Api.Parameters build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Api.Parameters buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Api.Parameters.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Api.Parameters.Builder>public Api.Parameters.Builder mergeFrom(Api.Parameters other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public Api.Parameters.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Api.Parameters.Builder>IOExceptionpublic boolean hasTemperature()
Exponential scaling output probability distribution
optional float temperature = 1;hasTemperature in interface Api.ParametersOrBuilderpublic float getTemperature()
Exponential scaling output probability distribution
optional float temperature = 1;getTemperature in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setTemperature(float value)
Exponential scaling output probability distribution
optional float temperature = 1;value - The temperature to set.public Api.Parameters.Builder clearTemperature()
Exponential scaling output probability distribution
optional float temperature = 1;public boolean hasMaxTokens()
The maximum number of tokens to generate in the char completion.
optional int64 max_tokens = 2;hasMaxTokens in interface Api.ParametersOrBuilderpublic long getMaxTokens()
The maximum number of tokens to generate in the char completion.
optional int64 max_tokens = 2;getMaxTokens in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setMaxTokens(long value)
The maximum number of tokens to generate in the char completion.
optional int64 max_tokens = 2;value - The maxTokens to set.public Api.Parameters.Builder clearMaxTokens()
The maximum number of tokens to generate in the char completion.
optional int64 max_tokens = 2;public boolean hasTopP()
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass
optional float top_p = 3;hasTopP in interface Api.ParametersOrBuilderpublic float getTopP()
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass
optional float top_p = 3;getTopP in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setTopP(float value)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass
optional float top_p = 3;value - The topP to set.public Api.Parameters.Builder clearTopP()
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass
optional float top_p = 3;public boolean hasPresencePenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
optional float presence_penalty = 4;hasPresencePenalty in interface Api.ParametersOrBuilderpublic float getPresencePenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
optional float presence_penalty = 4;getPresencePenalty in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setPresencePenalty(float value)
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
optional float presence_penalty = 4;value - The presencePenalty to set.public Api.Parameters.Builder clearPresencePenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
optional float presence_penalty = 4;public boolean hasFrequencyPenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
optional float frequency_penalty = 5;hasFrequencyPenalty in interface Api.ParametersOrBuilderpublic float getFrequencyPenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
optional float frequency_penalty = 5;getFrequencyPenalty in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setFrequencyPenalty(float value)
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
optional float frequency_penalty = 5;value - The frequencyPenalty to set.public Api.Parameters.Builder clearFrequencyPenalty()
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
optional float frequency_penalty = 5;public boolean hasMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in the prompt
optional int64 max_new_tokens = 6;hasMaxNewTokens in interface Api.ParametersOrBuilderpublic long getMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in the prompt
optional int64 max_new_tokens = 6;getMaxNewTokens in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setMaxNewTokens(long value)
The maximum number of tokens to generate, ignoring the number of tokens in the prompt
optional int64 max_new_tokens = 6;value - The maxNewTokens to set.public Api.Parameters.Builder clearMaxNewTokens()
The maximum number of tokens to generate, ignoring the number of tokens in the prompt
optional int64 max_new_tokens = 6;public boolean hasRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
optional float repetition_penalty = 7;hasRepetitionPenalty in interface Api.ParametersOrBuilderpublic float getRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
optional float repetition_penalty = 7;getRepetitionPenalty in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setRepetitionPenalty(float value)
The parameter for repetition penalty, from [1.0, 2.0]
optional float repetition_penalty = 7;value - The repetitionPenalty to set.public Api.Parameters.Builder clearRepetitionPenalty()
The parameter for repetition penalty, from [1.0, 2.0]
optional float repetition_penalty = 7;public boolean hasDoSample()
Whether or not to use sampling, use greedy decoding otherwise. Default to false
optional bool do_sample = 8;hasDoSample in interface Api.ParametersOrBuilderpublic boolean getDoSample()
Whether or not to use sampling, use greedy decoding otherwise. Default to false
optional bool do_sample = 8;getDoSample in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setDoSample(boolean value)
Whether or not to use sampling, use greedy decoding otherwise. Default to false
optional bool do_sample = 8;value - The doSample to set.public Api.Parameters.Builder clearDoSample()
Whether or not to use sampling, use greedy decoding otherwise. Default to false
optional bool do_sample = 8;public boolean hasTopK()
The number of highest probability vocabulary tokens to keep for top-k-filtering.
optional int64 top_k = 9;hasTopK in interface Api.ParametersOrBuilderpublic long getTopK()
The number of highest probability vocabulary tokens to keep for top-k-filtering.
optional int64 top_k = 9;getTopK in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setTopK(long value)
The number of highest probability vocabulary tokens to keep for top-k-filtering.
optional int64 top_k = 9;value - The topK to set.public Api.Parameters.Builder clearTopK()
The number of highest probability vocabulary tokens to keep for top-k-filtering.
optional int64 top_k = 9;public boolean hasMinNewTokens()
the minimum number of tokens to generate
optional int64 min_new_tokens = 10;hasMinNewTokens in interface Api.ParametersOrBuilderpublic long getMinNewTokens()
the minimum number of tokens to generate
optional int64 min_new_tokens = 10;getMinNewTokens in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setMinNewTokens(long value)
the minimum number of tokens to generate
optional int64 min_new_tokens = 10;value - The minNewTokens to set.public Api.Parameters.Builder clearMinNewTokens()
the minimum number of tokens to generate
optional int64 min_new_tokens = 10;public boolean hasMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this limit, it will be truncated as prompt[-max_prompt_tokens:]
optional int64 max_prompt_tokens = 11;hasMaxPromptTokens in interface Api.ParametersOrBuilderpublic long getMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this limit, it will be truncated as prompt[-max_prompt_tokens:]
optional int64 max_prompt_tokens = 11;getMaxPromptTokens in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setMaxPromptTokens(long value)
the maximum number of prompt tokens, if prompt tokens length over this limit, it will be truncated as prompt[-max_prompt_tokens:]
optional int64 max_prompt_tokens = 11;value - The maxPromptTokens to set.public Api.Parameters.Builder clearMaxPromptTokens()
the maximum number of prompt tokens, if prompt tokens length over this limit, it will be truncated as prompt[-max_prompt_tokens:]
optional int64 max_prompt_tokens = 11;public boolean hasLogprobs()
optional int64 logprobs = 12;hasLogprobs in interface Api.ParametersOrBuilderpublic long getLogprobs()
optional int64 logprobs = 12;getLogprobs in interface Api.ParametersOrBuilderpublic Api.Parameters.Builder setLogprobs(long value)
optional int64 logprobs = 12;value - The logprobs to set.public Api.Parameters.Builder clearLogprobs()
optional int64 logprobs = 12;public com.google.protobuf.ProtocolStringList getStopList()
repeated string stop = 13;getStopList in interface Api.ParametersOrBuilderpublic int getStopCount()
repeated string stop = 13;getStopCount in interface Api.ParametersOrBuilderpublic String getStop(int index)
repeated string stop = 13;getStop in interface Api.ParametersOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getStopBytes(int index)
repeated string stop = 13;getStopBytes in interface Api.ParametersOrBuilderindex - The index of the value to return.public Api.Parameters.Builder setStop(int index, String value)
repeated string stop = 13;index - The index to set the value at.value - The stop to set.public Api.Parameters.Builder addStop(String value)
repeated string stop = 13;value - The stop to add.public Api.Parameters.Builder addAllStop(Iterable<String> values)
repeated string stop = 13;values - The stop to add.public Api.Parameters.Builder clearStop()
repeated string stop = 13;public Api.Parameters.Builder addStopBytes(com.google.protobuf.ByteString value)
repeated string stop = 13;value - The bytes of the stop to add.public final Api.Parameters.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>public final Api.Parameters.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Api.Parameters.Builder>Copyright © 2025. All rights reserved.