- 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
addAllResponseModalities(Iterable<? extends GenerationConfig.Modality> values)
public GenerationConfig.Builder addAllResponseModalities(Iterable<? extends GenerationConfig.Modality> values)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| values | Iterable<? extends com.google.cloud.aiplatform.v1beta1.GenerationConfig.Modality>The responseModalities to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
addAllResponseModalitiesValue(Iterable<Integer> values)
public GenerationConfig.Builder addAllResponseModalitiesValue(Iterable<Integer> values)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| values | Iterable<Integer>The enum numeric values on the wire for responseModalities to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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 | |
addResponseModalities(GenerationConfig.Modality value)
public GenerationConfig.Builder addResponseModalities(GenerationConfig.Modality value)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.ModalityThe responseModalities to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
addResponseModalitiesValue(int value)
public GenerationConfig.Builder addResponseModalitiesValue(int value)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe enum numeric value on the wire for responseModalities to add. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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 | |
clearAudioTimestamp()
public GenerationConfig.Builder clearAudioTimestamp()Optional. If enabled, audio timestamp will be included in the request to the model.
 optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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 | |
clearFrequencyPenalty()
public GenerationConfig.Builder clearFrequencyPenalty()Optional. Frequency penalties.
 optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearLogprobs()
public GenerationConfig.Builder clearLogprobs()Optional. Logit probabilities.
 optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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. | 
clearMediaResolution()
public GenerationConfig.Builder clearMediaResolution()Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearModelConfig()
public GenerationConfig.Builder clearModelConfig()Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description | 
| oneof | OneofDescriptor | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearPresencePenalty()
public GenerationConfig.Builder clearPresencePenalty()Optional. Positive penalties.
 optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearResponseJsonSchema()
public GenerationConfig.Builder clearResponseJsonSchema() Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearResponseLogprobs()
public GenerationConfig.Builder clearResponseLogprobs()Optional. If true, export the logprobs results in response.
 optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearResponseMimeType()
public GenerationConfig.Builder clearResponseMimeType()Optional. Output response mimetype of the generated candidate text. Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
 string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearResponseModalities()
public GenerationConfig.Builder clearResponseModalities()Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearResponseSchema()
public GenerationConfig.Builder clearResponseSchema() Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearRoutingConfig()
public GenerationConfig.Builder clearRoutingConfig()Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
clearSeed()
public GenerationConfig.Builder clearSeed()Optional. Seed.
 optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
clearSpeechConfig()
public GenerationConfig.Builder clearSpeechConfig()Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| 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. | 
clearThinkingConfig()
public GenerationConfig.Builder clearThinkingConfig()Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
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 | |
getAudioTimestamp()
public boolean getAudioTimestamp()Optional. If enabled, audio timestamp will be included in the request to the model.
 optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | The audioTimestamp. | 
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 | |
getFrequencyPenalty()
public float getFrequencyPenalty()Optional. Frequency penalties.
 optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| float | The frequencyPenalty. | 
getLogprobs()
public int getLogprobs()Optional. Logit probabilities.
 optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| int | The logprobs. | 
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. | 
getMediaResolution()
public GenerationConfig.MediaResolution getMediaResolution()Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.MediaResolution | The mediaResolution. | 
getMediaResolutionValue()
public int getMediaResolutionValue()Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| int | The enum numeric value on the wire for mediaResolution. | 
getModelConfig()
public GenerationConfig.ModelConfig getModelConfig()Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ModelConfig | The modelConfig. | 
getModelConfigBuilder()
public GenerationConfig.ModelConfig.Builder getModelConfigBuilder()Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ModelConfig.Builder | |
getModelConfigOrBuilder()
public GenerationConfig.ModelConfigOrBuilder getModelConfigOrBuilder()Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ModelConfigOrBuilder | |
getPresencePenalty()
public float getPresencePenalty()Optional. Positive penalties.
 optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| float | The presencePenalty. | 
getResponseJsonSchema()
public Value getResponseJsonSchema() Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| Value | The responseJsonSchema. | 
getResponseJsonSchemaBuilder()
public Value.Builder getResponseJsonSchemaBuilder() Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| Builder | |
getResponseJsonSchemaOrBuilder()
public ValueOrBuilder getResponseJsonSchemaOrBuilder() Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| ValueOrBuilder | |
getResponseLogprobs()
public boolean getResponseLogprobs()Optional. If true, export the logprobs results in response.
 optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | The responseLogprobs. | 
getResponseMimeType()
public String getResponseMimeType()Optional. Output response mimetype of the generated candidate text. Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
 string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| String | The responseMimeType. | 
getResponseMimeTypeBytes()
public ByteString getResponseMimeTypeBytes()Optional. Output response mimetype of the generated candidate text. Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
 string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| ByteString | The bytes for responseMimeType. | 
getResponseModalities(int index)
public GenerationConfig.Modality getResponseModalities(int index)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| index | intThe index of the element to return. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Modality | The responseModalities at the given index. | 
getResponseModalitiesCount()
public int getResponseModalitiesCount()Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| int | The count of responseModalities. | 
getResponseModalitiesList()
public List<GenerationConfig.Modality> getResponseModalitiesList()Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| List<Modality> | A list containing the responseModalities. | 
getResponseModalitiesValue(int index)
public int getResponseModalitiesValue(int index)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| index | intThe index of the value to return. | 
| Returns | |
|---|---|
| Type | Description | 
| int | The enum numeric value on the wire of responseModalities at the given index. | 
getResponseModalitiesValueList()
public List<Integer> getResponseModalitiesValueList()Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| List<Integer> | A list containing the enum numeric values on the wire for responseModalities. | 
getResponseSchema()
public Schema getResponseSchema() Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| Schema | The responseSchema. | 
getResponseSchemaBuilder()
public Schema.Builder getResponseSchemaBuilder() Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| Schema.Builder | |
getResponseSchemaOrBuilder()
public SchemaOrBuilder getResponseSchemaOrBuilder() Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| SchemaOrBuilder | |
getRoutingConfig()
public GenerationConfig.RoutingConfig getRoutingConfig()Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.RoutingConfig | The routingConfig. | 
getRoutingConfigBuilder()
public GenerationConfig.RoutingConfig.Builder getRoutingConfigBuilder()Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.RoutingConfig.Builder | |
getRoutingConfigOrBuilder()
public GenerationConfig.RoutingConfigOrBuilder getRoutingConfigOrBuilder()Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.RoutingConfigOrBuilder | |
getSeed()
public int getSeed()Optional. Seed.
 optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| int | The seed. | 
getSpeechConfig()
public SpeechConfig getSpeechConfig()Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| SpeechConfig | The speechConfig. | 
getSpeechConfigBuilder()
public SpeechConfig.Builder getSpeechConfigBuilder()Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| SpeechConfig.Builder | |
getSpeechConfigOrBuilder()
public SpeechConfigOrBuilder getSpeechConfigOrBuilder()Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| SpeechConfigOrBuilder | |
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. | 
getThinkingConfig()
public GenerationConfig.ThinkingConfig getThinkingConfig()Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ThinkingConfig | The thinkingConfig. | 
getThinkingConfigBuilder()
public GenerationConfig.ThinkingConfig.Builder getThinkingConfigBuilder()Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ThinkingConfig.Builder | |
getThinkingConfigOrBuilder()
public GenerationConfig.ThinkingConfigOrBuilder getThinkingConfigOrBuilder()Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.ThinkingConfigOrBuilder | |
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. | 
hasAudioTimestamp()
public boolean hasAudioTimestamp()Optional. If enabled, audio timestamp will be included in the request to the model.
 optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the audioTimestamp field is set. | 
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. | 
hasFrequencyPenalty()
public boolean hasFrequencyPenalty()Optional. Frequency penalties.
 optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the frequencyPenalty field is set. | 
hasLogprobs()
public boolean hasLogprobs()Optional. Logit probabilities.
 optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the logprobs 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. | 
hasMediaResolution()
public boolean hasMediaResolution()Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the mediaResolution field is set. | 
hasModelConfig()
public boolean hasModelConfig()Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the modelConfig field is set. | 
hasPresencePenalty()
public boolean hasPresencePenalty()Optional. Positive penalties.
 optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the presencePenalty field is set. | 
hasResponseJsonSchema()
public boolean hasResponseJsonSchema() Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the responseJsonSchema field is set. | 
hasResponseLogprobs()
public boolean hasResponseLogprobs()Optional. If true, export the logprobs results in response.
 optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the responseLogprobs field is set. | 
hasResponseSchema()
public boolean hasResponseSchema() Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the responseSchema field is set. | 
hasRoutingConfig()
public boolean hasRoutingConfig()Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the routingConfig field is set. | 
hasSeed()
public boolean hasSeed()Optional. Seed.
 optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the seed field is set. | 
hasSpeechConfig()
public boolean hasSpeechConfig()Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the speechConfig 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. | 
hasThinkingConfig()
public boolean hasThinkingConfig()Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Returns | |
|---|---|
| Type | Description | 
| boolean | Whether the thinkingConfig 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 | |
mergeModelConfig(GenerationConfig.ModelConfig value)
public GenerationConfig.Builder mergeModelConfig(GenerationConfig.ModelConfig value)Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.ModelConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeResponseJsonSchema(Value value)
public GenerationConfig.Builder mergeResponseJsonSchema(Value value) Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | Value | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeResponseSchema(Schema value)
public GenerationConfig.Builder mergeResponseSchema(Schema value) Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | Schema | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeRoutingConfig(GenerationConfig.RoutingConfig value)
public GenerationConfig.Builder mergeRoutingConfig(GenerationConfig.RoutingConfig value)Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.RoutingConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeSpeechConfig(SpeechConfig value)
public GenerationConfig.Builder mergeSpeechConfig(SpeechConfig value)Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | SpeechConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
mergeThinkingConfig(GenerationConfig.ThinkingConfig value)
public GenerationConfig.Builder mergeThinkingConfig(GenerationConfig.ThinkingConfig value)Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.ThinkingConfig | 
| 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 | |
setAudioTimestamp(boolean value)
public GenerationConfig.Builder setAudioTimestamp(boolean value)Optional. If enabled, audio timestamp will be included in the request to the model.
 optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | booleanThe audioTimestamp to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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 | |
setFrequencyPenalty(float value)
public GenerationConfig.Builder setFrequencyPenalty(float value)Optional. Frequency penalties.
 optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | floatThe frequencyPenalty to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setLogprobs(int value)
public GenerationConfig.Builder setLogprobs(int value)Optional. Logit probabilities.
 optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe logprobs to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
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. | 
setMediaResolution(GenerationConfig.MediaResolution value)
public GenerationConfig.Builder setMediaResolution(GenerationConfig.MediaResolution value)Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.MediaResolutionThe mediaResolution to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setMediaResolutionValue(int value)
public GenerationConfig.Builder setMediaResolutionValue(int value)Optional. If specified, the media resolution specified will be used.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe enum numeric value on the wire for mediaResolution to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setModelConfig(GenerationConfig.ModelConfig value)
public GenerationConfig.Builder setModelConfig(GenerationConfig.ModelConfig value)Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.ModelConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setModelConfig(GenerationConfig.ModelConfig.Builder builderForValue)
public GenerationConfig.Builder setModelConfig(GenerationConfig.ModelConfig.Builder builderForValue)Optional. Config for model selection.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ModelConfig model_config = 27 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | GenerationConfig.ModelConfig.Builder | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setPresencePenalty(float value)
public GenerationConfig.Builder setPresencePenalty(float value)Optional. Positive penalties.
 optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | floatThe presencePenalty 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 | |
setResponseJsonSchema(Value value)
public GenerationConfig.Builder setResponseJsonSchema(Value value) Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | Value | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setResponseJsonSchema(Value.Builder builderForValue)
public GenerationConfig.Builder setResponseJsonSchema(Value.Builder builderForValue) Optional. Output schema of the generated response. This is an alternative
 to response_schema that accepts JSON Schema.
 If set, response_schema must be omitted, but response_mime_type is
 required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
- $id
- $defs
- $ref
- $anchor
- type
- format
- title
- description
- enum(for strings and numbers)
- items
- prefixItems
- minItems
- maxItems
- minimum
- maximum
- anyOf
- oneOf(interpreted the same as- anyOf)
- properties
- additionalProperties
- required- The non-standard - propertyOrderingproperty may also be set.- Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If - $refis set on a sub-schema, no other properties, except for than those starting as a- $, may be set.
 
 optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | Builder | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setResponseLogprobs(boolean value)
public GenerationConfig.Builder setResponseLogprobs(boolean value)Optional. If true, export the logprobs results in response.
 optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | booleanThe responseLogprobs to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setResponseMimeType(String value)
public GenerationConfig.Builder setResponseMimeType(String value)Optional. Output response mimetype of the generated candidate text. Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
 string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | StringThe responseMimeType to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setResponseMimeTypeBytes(ByteString value)
public GenerationConfig.Builder setResponseMimeTypeBytes(ByteString value)Optional. Output response mimetype of the generated candidate text. Supported mimetype:
- text/plain: (default) Text output.
- application/json: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
 string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | ByteStringThe bytes for responseMimeType to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setResponseModalities(int index, GenerationConfig.Modality value)
public GenerationConfig.Builder setResponseModalities(int index, GenerationConfig.Modality value)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameters | |
|---|---|
| Name | Description | 
| index | intThe index to set the value at. | 
| value | GenerationConfig.ModalityThe responseModalities to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setResponseModalitiesValue(int index, int value)
public GenerationConfig.Builder setResponseModalitiesValue(int index, int value)Optional. The modalities of the response.
 
 repeated .google.cloud.aiplatform.v1beta1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameters | |
|---|---|
| Name | Description | 
| index | intThe index to set the value at. | 
| value | intThe enum numeric value on the wire for responseModalities to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setResponseSchema(Schema value)
public GenerationConfig.Builder setResponseSchema(Schema value) Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | Schema | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setResponseSchema(Schema.Builder builderForValue)
public GenerationConfig.Builder setResponseSchema(Schema.Builder builderForValue) Optional. The Schema object allows the definition of input and output
 data types. These types can be objects, but also primitives and arrays.
 Represents a select subset of an OpenAPI 3.0 schema
 object.
 If set, a compatible response_mime_type must also be set.
 Compatible mimetypes:
 application/json: Schema for JSON response.
 
 optional .google.cloud.aiplatform.v1beta1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | Schema.Builder | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setRoutingConfig(GenerationConfig.RoutingConfig value)
public GenerationConfig.Builder setRoutingConfig(GenerationConfig.RoutingConfig value)Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.RoutingConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setRoutingConfig(GenerationConfig.RoutingConfig.Builder builderForValue)
public GenerationConfig.Builder setRoutingConfig(GenerationConfig.RoutingConfig.Builder builderForValue)Optional. Routing configuration.
 
 optional .google.cloud.aiplatform.v1beta1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | GenerationConfig.RoutingConfig.Builder | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setSeed(int value)
public GenerationConfig.Builder setSeed(int value)Optional. Seed.
 optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
| value | intThe seed to set. | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | This builder for chaining. | 
setSpeechConfig(SpeechConfig value)
public GenerationConfig.Builder setSpeechConfig(SpeechConfig value)Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | SpeechConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setSpeechConfig(SpeechConfig.Builder builderForValue)
public GenerationConfig.Builder setSpeechConfig(SpeechConfig.Builder builderForValue)Optional. The speech generation config.
 
 optional .google.cloud.aiplatform.v1beta1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | SpeechConfig.Builder | 
| 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. | 
setThinkingConfig(GenerationConfig.ThinkingConfig value)
public GenerationConfig.Builder setThinkingConfig(GenerationConfig.ThinkingConfig value)Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| value | GenerationConfig.ThinkingConfig | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
setThinkingConfig(GenerationConfig.ThinkingConfig.Builder builderForValue)
public GenerationConfig.Builder setThinkingConfig(GenerationConfig.ThinkingConfig.Builder builderForValue)Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
 
 .google.cloud.aiplatform.v1beta1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
 
| Parameter | |
|---|---|
| Name | Description | 
| builderForValue | GenerationConfig.ThinkingConfig.Builder | 
| Returns | |
|---|---|
| Type | Description | 
| GenerationConfig.Builder | |
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 | |