- 3.79.0 (latest)
- 3.77.0
- 3.76.0
- 3.75.0
- 3.74.0
- 3.73.0
- 3.71.0
- 3.69.0
- 3.68.0
- 3.65.0
- 3.64.0
- 3.63.0
- 3.61.0
- 3.60.0
- 3.59.0
- 3.58.0
- 3.57.0
- 3.56.0
- 3.55.0
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.3.0
- 3.2.0
- 3.0.0
- 2.9.8
- 2.8.9
- 2.7.4
- 2.5.3
- 2.4.0
public static final class GenerationConfig.Builder extends GeneratedMessageV3.Builder<GenerationConfig.Builder> implements GenerationConfigOrBuilderGeneration config.
 Protobuf type google.cloud.aiplatform.v1beta1.GenerationConfig
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerationConfig.BuilderImplements
GenerationConfigOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description | 
| Descriptor | |
Methods
addAllStopSequences(Iterable<String> values)
public GenerationConfig.Builder addAllStopSequences(Iterable<String> values)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| values | Iterable<String>The stopSequences to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description | 
| field | FieldDescriptor | 
| value | Object | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
addStopSequences(String value)
public GenerationConfig.Builder addStopSequences(String value)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | StringThe stopSequences to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
addStopSequencesBytes(ByteString value)
public GenerationConfig.Builder addStopSequencesBytes(ByteString value)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | ByteStringThe bytes of the stopSequences to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
build()
public GenerationConfig build()| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig | |
buildPartial()
public GenerationConfig buildPartial()| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig | |
clear()
public GenerationConfig.Builder clear()| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearCandidateCount()
public GenerationConfig.Builder clearCandidateCount()Optional. Number of candidates to generate.
 optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearField(Descriptors.FieldDescriptor field)
public GenerationConfig.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description | 
| field | FieldDescriptor | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearMaxOutputTokens()
public GenerationConfig.Builder clearMaxOutputTokens()Optional. The maximum number of output tokens to generate per message.
 optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description | 
| oneof | OneofDescriptor | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearStopSequences()
public GenerationConfig.Builder clearStopSequences()Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearTemperature()
public GenerationConfig.Builder clearTemperature()Optional. Controls the randomness of predictions.
 optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearTopK()
public GenerationConfig.Builder clearTopK()Optional. If specified, top-k sampling will be used.
 optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearTopP()
public GenerationConfig.Builder clearTopP()Optional. If specified, nucleus sampling will be used.
 optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clone()
public GenerationConfig.Builder clone()| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
getCandidateCount()
public int getCandidateCount()Optional. Number of candidates to generate.
 optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| int | The candidateCount. | 
getDefaultInstanceForType()
public GenerationConfig getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig | |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description | 
| Descriptor | |
getMaxOutputTokens()
public int getMaxOutputTokens()Optional. The maximum number of output tokens to generate per message.
 optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| int | The maxOutputTokens. | 
getStopSequences(int index)
public String getStopSequences(int index)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| index | intThe index of the element to return. | 
| Returns | |
|---|---|
| Type | Description | 
| String | The stopSequences at the given index. | 
getStopSequencesBytes(int index)
public ByteString getStopSequencesBytes(int index)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| index | intThe index of the value to return. | 
| Returns | |
|---|---|
| Type | Description | 
| ByteString | The bytes of the stopSequences at the given index. | 
getStopSequencesCount()
public int getStopSequencesCount()Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| int | The count of stopSequences. | 
getStopSequencesList()
public ProtocolStringList getStopSequencesList()Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| ProtocolStringList | A list containing the stopSequences. | 
getTemperature()
public float getTemperature()Optional. Controls the randomness of predictions.
 optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| float | The temperature. | 
getTopK()
public float getTopK()Optional. If specified, top-k sampling will be used.
 optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| float | The topK. | 
getTopP()
public float getTopP()Optional. If specified, nucleus sampling will be used.
 optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| float | The topP. | 
hasCandidateCount()
public boolean hasCandidateCount()Optional. Number of candidates to generate.
 optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the candidateCount field is set. | 
hasMaxOutputTokens()
public boolean hasMaxOutputTokens()Optional. The maximum number of output tokens to generate per message.
 optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the maxOutputTokens field is set. | 
hasTemperature()
public boolean hasTemperature()Optional. Controls the randomness of predictions.
 optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the temperature field is set. | 
hasTopK()
public boolean hasTopK()Optional. If specified, top-k sampling will be used.
 optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the topK field is set. | 
hasTopP()
public boolean hasTopP()Optional. If specified, nucleus sampling will be used.
 optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the topP field is set. | 
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description | 
| FieldAccessorTable | |
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description | 
| boolean | |
mergeFrom(GenerationConfig other)
public GenerationConfig.Builder mergeFrom(GenerationConfig other)| Parameter | |
|---|---|
| Name | Description | 
| other | GenerationConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description | 
| input | CodedInputStream | 
| extensionRegistry | ExtensionRegistryLite | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
| Exceptions | |
|---|---|
| Type | Description | 
| IOException | |
mergeFrom(Message other)
public GenerationConfig.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description | 
| other | Message | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description | 
| unknownFields | UnknownFieldSet | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setCandidateCount(int value)
public GenerationConfig.Builder setCandidateCount(int value)Optional. Number of candidates to generate.
 optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe candidateCount to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setField(Descriptors.FieldDescriptor field, Object value)
public GenerationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description | 
| field | FieldDescriptor | 
| value | Object | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setMaxOutputTokens(int value)
public GenerationConfig.Builder setMaxOutputTokens(int value)Optional. The maximum number of output tokens to generate per message.
 optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe maxOutputTokens to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerationConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description | 
| field | FieldDescriptor | 
| index | int | 
| value | Object | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setStopSequences(int index, String value)
public GenerationConfig.Builder setStopSequences(int index, String value)Optional. Stop sequences.
 repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description | 
| index | intThe index to set the value at. | 
| value | StringThe stopSequences to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setTemperature(float value)
public GenerationConfig.Builder setTemperature(float value)Optional. Controls the randomness of predictions.
 optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | floatThe temperature to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setTopK(float value)
public GenerationConfig.Builder setTopK(float value)Optional. If specified, top-k sampling will be used.
 optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | floatThe topK to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setTopP(float value)
public GenerationConfig.Builder setTopP(float value)Optional. If specified, nucleus sampling will be used.
 optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | floatThe topP to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerationConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description | 
| unknownFields | UnknownFieldSet | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |