Package com.google.cloud.aiplatform.v1
Interface GenerationConfigOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
GenerationConfig,GenerationConfig.Builder
@Generated
public interface GenerationConfigOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanOptional.intOptional.floatOptional.Optional.Optional.intOptional.intOptional.Optional.intOptional.floatOptional.com.google.protobuf.ValueOptional.com.google.protobuf.ValueOrBuilderOptional.booleanOptional.Optional.com.google.protobuf.ByteStringOptional.getResponseModalities(int index) Optional.intOptional.Optional.intgetResponseModalitiesValue(int index) Optional.Optional.Optional.Optional.Optional.Optional.intgetSeed()Optional.Optional.Optional.getStopSequences(int index) Optional.com.google.protobuf.ByteStringgetStopSequencesBytes(int index) Optional.intOptional.Optional.floatOptional.Optional.Optional.floatgetTopK()Optional.floatgetTopP()Optional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanOptional.booleanhasSeed()Optional.booleanOptional.booleanOptional.booleanOptional.booleanhasTopK()Optional.booleanhasTopP()Optional.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasTemperature
boolean hasTemperature()Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the temperature field is set.
-
getTemperature
float getTemperature()Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The temperature.
-
hasTopP
boolean hasTopP()Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the topP field is set.
-
getTopP
float getTopP()Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The topP.
-
hasTopK
boolean hasTopK()Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the topK field is set.
-
getTopK
float getTopK()Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The topK.
-
hasCandidateCount
boolean hasCandidateCount()Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the candidateCount field is set.
-
getCandidateCount
int getCandidateCount()Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The candidateCount.
-
hasMaxOutputTokens
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:
- Whether the maxOutputTokens field is set.
-
getMaxOutputTokens
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:
- The maxOutputTokens.
-
getStopSequencesList
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- A list containing the stopSequences.
-
getStopSequencesCount
int getStopSequencesCount()Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The count of stopSequences.
-
getStopSequences
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index of the element to return.- Returns:
- The stopSequences at the given index.
-
getStopSequencesBytes
com.google.protobuf.ByteString getStopSequencesBytes(int index) Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the stopSequences at the given index.
-
hasResponseLogprobs
boolean hasResponseLogprobs()Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the responseLogprobs field is set.
-
getResponseLogprobs
boolean getResponseLogprobs()Optional. If true, export the logprobs results in response.
optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The responseLogprobs.
-
hasLogprobs
boolean hasLogprobs()Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the logprobs field is set.
-
getLogprobs
int getLogprobs()Optional. Logit probabilities.
optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The logprobs.
-
hasPresencePenalty
boolean hasPresencePenalty()Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the presencePenalty field is set.
-
getPresencePenalty
float getPresencePenalty()Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The presencePenalty.
-
hasFrequencyPenalty
boolean hasFrequencyPenalty()Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the frequencyPenalty field is set.
-
getFrequencyPenalty
float getFrequencyPenalty()Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The frequencyPenalty.
-
hasSeed
boolean hasSeed()Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the seed field is set.
-
getSeed
int getSeed()Optional. Seed.
optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The seed.
-
getResponseMimeType
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:
- The responseMimeType.
-
getResponseMimeTypeBytes
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];- Returns:
- The bytes for responseMimeType.
-
hasResponseSchema
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];- Returns:
- Whether the responseSchema field is set.
-
getResponseSchema
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];- Returns:
- The responseSchema.
-
getResponseSchemaOrBuilder
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]; -
hasResponseJsonSchema
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];- Returns:
- Whether the responseJsonSchema field is set.
-
getResponseJsonSchema
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];- Returns:
- The responseJsonSchema.
-
getResponseJsonSchemaOrBuilder
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]; -
hasRoutingConfig
boolean hasRoutingConfig()Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the routingConfig field is set.
-
getRoutingConfig
GenerationConfig.RoutingConfig getRoutingConfig()Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The routingConfig.
-
getRoutingConfigOrBuilder
GenerationConfig.RoutingConfigOrBuilder getRoutingConfigOrBuilder()Optional. Routing configuration.
optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; -
hasAudioTimestamp
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];- Returns:
- Whether the audioTimestamp field is set.
-
getAudioTimestamp
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];- Returns:
- The audioTimestamp.
-
getResponseModalitiesList
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];- Returns:
- A list containing the responseModalities.
-
getResponseModalitiesCount
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];- Returns:
- The count of responseModalities.
-
getResponseModalities
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];- Parameters:
index- The index of the element to return.- Returns:
- The responseModalities at the given index.
-
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];- Returns:
- A list containing the enum numeric values on the wire for responseModalities.
-
getResponseModalitiesValue
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];- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of responseModalities at the given index.
-
hasMediaResolution
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];- Returns:
- Whether the mediaResolution field is set.
-
getMediaResolutionValue
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];- Returns:
- The enum numeric value on the wire for mediaResolution.
-
getMediaResolution
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];- Returns:
- The mediaResolution.
-
hasSpeechConfig
boolean hasSpeechConfig()Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the speechConfig field is set.
-
getSpeechConfig
SpeechConfig getSpeechConfig()Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The speechConfig.
-
getSpeechConfigOrBuilder
SpeechConfigOrBuilder getSpeechConfigOrBuilder()Optional. The speech generation config.
optional .google.cloud.aiplatform.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; -
hasThinkingConfig
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];- Returns:
- Whether the thinkingConfig field is set.
-
getThinkingConfig
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];- Returns:
- The thinkingConfig.
-
getThinkingConfigOrBuilder
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]; -
hasImageConfig
boolean hasImageConfig()Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- Whether the imageConfig field is set.
-
getImageConfig
ImageConfig getImageConfig()Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The imageConfig.
-
getImageConfigOrBuilder
ImageConfigOrBuilder getImageConfigOrBuilder()Optional. Config for image generation features.
optional .google.cloud.aiplatform.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL];
-