public static final class GenerationConfig.Builder extends GeneratedMessageV3.Builder<GenerationConfig.Builder> implements GenerationConfigOrBuilder
Generation config.
Protobuf type google.cloud.vertexai.v1.GenerationConfig
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerationConfig.BuilderImplements
GenerationConfigOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllStopSequences(Iterable<String> values)
public GenerationConfig.Builder addAllStopSequences(Iterable<String> values)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The stopSequences to add. |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
addStopSequences(String value)
public GenerationConfig.Builder addStopSequences(String value)
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
String The 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 |
ByteString The bytes of the stopSequences to add. |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
build()
public GenerationConfig build()
Returns | |
---|---|
Type | Description |
GenerationConfig |
buildPartial()
public GenerationConfig buildPartial()
Returns | |
---|---|
Type | Description |
GenerationConfig |
clear()
public GenerationConfig.Builder clear()
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
clearCandidateCount()
public GenerationConfig.Builder clearCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public GenerationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
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. |
clearMaxOutputTokens()
public GenerationConfig.Builder clearMaxOutputTokens()
Optional. The maximum number of output tokens to generate per message.
optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
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. |
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. |
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.vertexai.v1.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.vertexai.v1.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. |
clearStopSequences()
public GenerationConfig.Builder clearStopSequences()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clearTemperature()
public GenerationConfig.Builder clearTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clearTopK()
public GenerationConfig.Builder clearTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clearTopP()
public GenerationConfig.Builder clearTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
clone()
public GenerationConfig.Builder clone()
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
getCandidateCount()
public int getCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
The candidateCount. |
getDefaultInstanceForType()
public GenerationConfig getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
GenerationConfig |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getFrequencyPenalty()
public float getFrequencyPenalty()
Optional. Frequency penalties.
optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
float |
The frequencyPenalty. |
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. |
getPresencePenalty()
public float getPresencePenalty()
Optional. Positive penalties.
optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
float |
The presencePenalty. |
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. |
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.vertexai.v1.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.vertexai.v1.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.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
SchemaOrBuilder |
getRoutingConfig()
public GenerationConfig.RoutingConfig getRoutingConfig()
Optional. Routing configuration.
optional .google.cloud.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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. |
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 |
int The 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 |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the stopSequences at the given index. |
getStopSequencesCount()
public int getStopSequencesCount()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
The count of stopSequences. |
getStopSequencesList()
public ProtocolStringList getStopSequencesList()
Optional. Stop sequences.
repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the stopSequences. |
getTemperature()
public float getTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
float |
The temperature. |
getTopK()
public float getTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
float |
The topK. |
getTopP()
public float getTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
float |
The topP. |
hasCandidateCount()
public boolean hasCandidateCount()
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the candidateCount field is set. |
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. |
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. |
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. |
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.vertexai.v1.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.vertexai.v1.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. |
hasTemperature()
public boolean hasTemperature()
Optional. Controls the randomness of predictions.
optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the temperature field is set. |
hasTopK()
public boolean hasTopK()
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the topK field is set. |
hasTopP()
public boolean hasTopP()
Optional. If specified, nucleus sampling will be used.
optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the topP field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(GenerationConfig other)
public GenerationConfig.Builder mergeFrom(GenerationConfig other)
Parameter | |
---|---|
Name | Description |
other |
GenerationConfig |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public GenerationConfig.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
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.vertexai.v1.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.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
GenerationConfig.RoutingConfig |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
setCandidateCount(int value)
public GenerationConfig.Builder setCandidateCount(int value)
Optional. Number of candidates to generate.
optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
int The 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 |
float The frequencyPenalty 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 |
int The maxOutputTokens to set. |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
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 |
float The 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 |
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 |
String The 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 |
ByteString The bytes for responseMimeType 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.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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.vertexai.v1.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 |
int The seed to set. |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
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 |
int The index to set the value at. |
value |
String The 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 |
float The temperature to set. |
Returns | |
---|---|
Type | Description |
GenerationConfig.Builder |
This builder for chaining. |
setTopK(float value)
public GenerationConfig.Builder setTopK(float value)
Optional. If specified, top-k sampling will be used.
optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
float The 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 |
float The 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 |