public static final class GenerationConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<GenerationConfig.Builder> implements GenerationConfigOrBuilder
Generation config.Protobuf type
google.cloud.aiplatform.v1.GenerationConfigaddRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, 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.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<GenerationConfig.Builder>public GenerationConfig.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<GenerationConfig.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.GeneratedMessage.Builder<GenerationConfig.Builder>public GenerationConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic GenerationConfig build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic GenerationConfig buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic GenerationConfig.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<GenerationConfig.Builder>public GenerationConfig.Builder mergeFrom(GenerationConfig other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<GenerationConfig.Builder>public GenerationConfig.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<GenerationConfig.Builder>IOExceptionpublic boolean hasTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];hasTemperature in interface GenerationConfigOrBuilderpublic float getTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];getTemperature in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setTemperature(float value)
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];value - The temperature to set.public GenerationConfig.Builder clearTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];public boolean hasTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];hasTopP in interface GenerationConfigOrBuilderpublic float getTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];getTopP in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setTopP(float value)
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];value - The topP to set.public GenerationConfig.Builder clearTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];public boolean hasTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];hasTopK in interface GenerationConfigOrBuilderpublic float getTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];getTopK in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setTopK(float value)
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];value - The topK to set.public GenerationConfig.Builder clearTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];public boolean hasCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];hasCandidateCount in interface GenerationConfigOrBuilderpublic int getCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];getCandidateCount in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setCandidateCount(int value)
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];value - The candidateCount to set.public GenerationConfig.Builder clearCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];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];hasMaxOutputTokens in interface GenerationConfigOrBuilderpublic int getMaxOutputTokens()
Optional. The maximum number of output tokens to generate per message.
optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];getMaxOutputTokens in interface GenerationConfigOrBuilderpublic 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];value - The maxOutputTokens to set.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];public com.google.protobuf.ProtocolStringList getStopSequencesList()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];getStopSequencesList in interface GenerationConfigOrBuilderpublic int getStopSequencesCount()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];getStopSequencesCount in interface GenerationConfigOrBuilderpublic String getStopSequences(int index)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];getStopSequences in interface GenerationConfigOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getStopSequencesBytes(int index)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];getStopSequencesBytes in interface GenerationConfigOrBuilderindex - The index of the value to return.public GenerationConfig.Builder setStopSequences(int index, String value)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];index - The index to set the value at.value - The stopSequences to set.public GenerationConfig.Builder addStopSequences(String value)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];value - The stopSequences to add.public GenerationConfig.Builder addAllStopSequences(Iterable<String> values)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];values - The stopSequences to add.public GenerationConfig.Builder clearStopSequences()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];public GenerationConfig.Builder addStopSequencesBytes(com.google.protobuf.ByteString value)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];value - The bytes of the stopSequences to add.public boolean hasResponseLogprobs()
Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];hasResponseLogprobs in interface GenerationConfigOrBuilderpublic boolean getResponseLogprobs()
Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];getResponseLogprobs in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setResponseLogprobs(boolean value)
Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];value - The responseLogprobs to set.public GenerationConfig.Builder clearResponseLogprobs()
Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];public boolean hasLogprobs()
Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];hasLogprobs in interface GenerationConfigOrBuilderpublic int getLogprobs()
Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];getLogprobs in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setLogprobs(int value)
Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];value - The logprobs to set.public GenerationConfig.Builder clearLogprobs()
Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];public boolean hasPresencePenalty()
Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];hasPresencePenalty in interface GenerationConfigOrBuilderpublic float getPresencePenalty()
Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];getPresencePenalty in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setPresencePenalty(float value)
Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];value - The presencePenalty to set.public GenerationConfig.Builder clearPresencePenalty()
Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];public boolean hasFrequencyPenalty()
Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];hasFrequencyPenalty in interface GenerationConfigOrBuilderpublic float getFrequencyPenalty()
Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];getFrequencyPenalty in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setFrequencyPenalty(float value)
Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];value - The frequencyPenalty to set.public GenerationConfig.Builder clearFrequencyPenalty()
Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];public boolean hasSeed()
Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];hasSeed in interface GenerationConfigOrBuilderpublic int getSeed()
Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];getSeed in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setSeed(int value)
Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];value - The seed to set.public GenerationConfig.Builder clearSeed()
Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];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];getResponseMimeType in interface GenerationConfigOrBuilderpublic com.google.protobuf.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];getResponseMimeTypeBytes in interface GenerationConfigOrBuilderpublic 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];value - The responseMimeType to set.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];public GenerationConfig.Builder setResponseMimeTypeBytes(com.google.protobuf.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];value - The bytes for responseMimeType to set.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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
hasResponseSchema in interface GenerationConfigOrBuilderpublic 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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
getResponseSchema in interface GenerationConfigOrBuilderpublic 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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
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](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.
optional .google.cloud.aiplatform.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
getResponseSchemaOrBuilder in interface GenerationConfigOrBuilderpublic boolean hasResponseJsonSchema()
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
hasResponseJsonSchema in interface GenerationConfigOrBuilderpublic com.google.protobuf.Value getResponseJsonSchema()
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
getResponseJsonSchema in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setResponseJsonSchema(com.google.protobuf.Value value)
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
public GenerationConfig.Builder setResponseJsonSchema(com.google.protobuf.Value.Builder builderForValue)
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
public GenerationConfig.Builder mergeResponseJsonSchema(com.google.protobuf.Value value)
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
public GenerationConfig.Builder clearResponseJsonSchema()
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
public com.google.protobuf.Value.Builder getResponseJsonSchemaBuilder()
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder()
Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). 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 `propertyOrdering` property 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 `$ref` is 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];
getResponseJsonSchemaOrBuilder in interface GenerationConfigOrBuilderpublic boolean hasRoutingConfig()
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
hasRoutingConfig in interface GenerationConfigOrBuilderpublic GenerationConfig.RoutingConfig getRoutingConfig()
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
getRoutingConfig in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setRoutingConfig(GenerationConfig.RoutingConfig value)
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder setRoutingConfig(GenerationConfig.RoutingConfig.Builder builderForValue)
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder mergeRoutingConfig(GenerationConfig.RoutingConfig value)
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder clearRoutingConfig()
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.RoutingConfig.Builder getRoutingConfigBuilder()
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.RoutingConfigOrBuilder getRoutingConfigOrBuilder()
Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
getRoutingConfigOrBuilder in interface GenerationConfigOrBuilderpublic boolean hasAudioTimestamp()
Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];hasAudioTimestamp in interface GenerationConfigOrBuilderpublic boolean getAudioTimestamp()
Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];getAudioTimestamp in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setAudioTimestamp(boolean value)
Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];value - The audioTimestamp to set.public GenerationConfig.Builder clearAudioTimestamp()
Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
optional bool audio_timestamp = 20 [(.google.api.field_behavior) = OPTIONAL];public List<GenerationConfig.Modality> getResponseModalitiesList()
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
getResponseModalitiesList in interface GenerationConfigOrBuilderpublic int getResponseModalitiesCount()
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
getResponseModalitiesCount in interface GenerationConfigOrBuilderpublic GenerationConfig.Modality getResponseModalities(int index)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
getResponseModalities in interface GenerationConfigOrBuilderindex - The index of the element to return.public GenerationConfig.Builder setResponseModalities(int index, GenerationConfig.Modality value)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
index - The index to set the value at.value - The responseModalities to set.public GenerationConfig.Builder addResponseModalities(GenerationConfig.Modality value)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
value - The responseModalities to add.public GenerationConfig.Builder addAllResponseModalities(Iterable<? extends GenerationConfig.Modality> values)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
values - The responseModalities to add.public GenerationConfig.Builder clearResponseModalities()
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
public List<Integer> getResponseModalitiesValueList()
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
getResponseModalitiesValueList in interface GenerationConfigOrBuilderpublic int getResponseModalitiesValue(int index)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
getResponseModalitiesValue in interface GenerationConfigOrBuilderindex - The index of the value to return.public GenerationConfig.Builder setResponseModalitiesValue(int index, int value)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
index - The index to set the value at.value - The enum numeric value on the wire for responseModalities to set.public GenerationConfig.Builder addResponseModalitiesValue(int value)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
value - The enum numeric value on the wire for responseModalities to add.public GenerationConfig.Builder addAllResponseModalitiesValue(Iterable<Integer> values)
Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
repeated .google.cloud.aiplatform.v1.GenerationConfig.Modality response_modalities = 21 [(.google.api.field_behavior) = OPTIONAL];
values - The enum numeric values on the wire for responseModalities to add.public boolean hasMediaResolution()
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
hasMediaResolution in interface GenerationConfigOrBuilderpublic int getMediaResolutionValue()
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
getMediaResolutionValue in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setMediaResolutionValue(int value)
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
value - The enum numeric value on the wire for mediaResolution to set.public GenerationConfig.MediaResolution getMediaResolution()
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
getMediaResolution in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setMediaResolution(GenerationConfig.MediaResolution value)
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
value - The mediaResolution to set.public GenerationConfig.Builder clearMediaResolution()
Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
optional .google.cloud.aiplatform.v1.GenerationConfig.MediaResolution media_resolution = 22 [(.google.api.field_behavior) = OPTIONAL];
public boolean hasSpeechConfig()
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
hasSpeechConfig in interface GenerationConfigOrBuilderpublic SpeechConfig getSpeechConfig()
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
getSpeechConfig in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setSpeechConfig(SpeechConfig value)
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder setSpeechConfig(SpeechConfig.Builder builderForValue)
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder mergeSpeechConfig(SpeechConfig value)
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder clearSpeechConfig()
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
public SpeechConfig.Builder getSpeechConfigBuilder()
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
public SpeechConfigOrBuilder getSpeechConfigOrBuilder()
Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];
getSpeechConfigOrBuilder in interface GenerationConfigOrBuilderpublic 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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
hasThinkingConfig in interface GenerationConfigOrBuilderpublic 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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
getThinkingConfig in interface GenerationConfigOrBuilderpublic 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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
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.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL];
getThinkingConfigOrBuilder in interface GenerationConfigOrBuilderpublic boolean hasImageConfig()
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
hasImageConfig in interface GenerationConfigOrBuilderpublic ImageConfig getImageConfig()
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
getImageConfig in interface GenerationConfigOrBuilderpublic GenerationConfig.Builder setImageConfig(ImageConfig value)
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder setImageConfig(ImageConfig.Builder builderForValue)
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder mergeImageConfig(ImageConfig value)
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
public GenerationConfig.Builder clearImageConfig()
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
public ImageConfig.Builder getImageConfigBuilder()
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
public ImageConfigOrBuilder getImageConfigOrBuilder()
Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
getImageConfigOrBuilder in interface GenerationConfigOrBuilderCopyright © 2026 Google LLC. All rights reserved.