Class BetaModelInfo.Builder
-
- All Implemented Interfaces:
public final class BetaModelInfo.BuilderA builder for BetaModelInfo.
-
-
Method Summary
Modifier and Type Method Description final BetaModelInfo.Builderid(String id)Unique model identifier. final BetaModelInfo.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final BetaModelInfo.BuilderallowedFallbackModels(List<String> allowedFallbackModels)Model IDs this model accepts as fallbacks[i].modelon the Messages API.final BetaModelInfo.BuilderallowedFallbackModels(Optional<List<String>> allowedFallbackModels)Alias for calling Builder.allowedFallbackModels with allowedFallbackModels.orElse(null).final BetaModelInfo.BuilderallowedFallbackModels(JsonField<List<String>> allowedFallbackModels)Sets Builder.allowedFallbackModels to an arbitrary JSON value. final BetaModelInfo.BuilderaddAllowedFallbackModel(String allowedFallbackModel)Adds a single String to allowedFallbackModels. final BetaModelInfo.Buildercapabilities(BetaModelCapabilities capabilities)Model capability information. final BetaModelInfo.Buildercapabilities(Optional<BetaModelCapabilities> capabilities)Alias for calling Builder.capabilities with capabilities.orElse(null).final BetaModelInfo.Buildercapabilities(JsonField<BetaModelCapabilities> capabilities)Sets Builder.capabilities to an arbitrary JSON value. final BetaModelInfo.BuildercreatedAt(OffsetDateTime createdAt)RFC 3339 datetime string representing the time at which the model was released. final BetaModelInfo.BuildercreatedAt(JsonField<OffsetDateTime> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final BetaModelInfo.BuilderdisplayName(String displayName)A human-readable name for the model. final BetaModelInfo.BuilderdisplayName(JsonField<String> displayName)Sets Builder.displayName to an arbitrary JSON value. final BetaModelInfo.BuildermaxInputTokens(Long maxInputTokens)Maximum input context window size in tokens for this model. final BetaModelInfo.BuildermaxInputTokens(Long maxInputTokens)Alias for Builder.maxInputTokens. final BetaModelInfo.BuildermaxInputTokens(Optional<Long> maxInputTokens)Alias for calling Builder.maxInputTokens with maxInputTokens.orElse(null).final BetaModelInfo.BuildermaxInputTokens(JsonField<Long> maxInputTokens)Sets Builder.maxInputTokens to an arbitrary JSON value. final BetaModelInfo.BuildermaxTokens(Long maxTokens)Maximum value for the max_tokensparameter when using this model.final BetaModelInfo.BuildermaxTokens(Long maxTokens)Alias for Builder.maxTokens. final BetaModelInfo.BuildermaxTokens(Optional<Long> maxTokens)Alias for calling Builder.maxTokens with maxTokens.orElse(null).final BetaModelInfo.BuildermaxTokens(JsonField<Long> maxTokens)Sets Builder.maxTokens to an arbitrary JSON value. final BetaModelInfo.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final BetaModelInfo.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaModelInfo.BuilderputAdditionalProperty(String key, JsonValue value)final BetaModelInfo.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaModelInfo.BuilderremoveAdditionalProperty(String key)final BetaModelInfo.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaModelInfobuild()Returns an immutable instance of BetaModelInfo. -
-
Method Detail
-
id
final BetaModelInfo.Builder id(String id)
Unique model identifier.
-
id
final BetaModelInfo.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedFallbackModels
final BetaModelInfo.Builder allowedFallbackModels(List<String> allowedFallbackModels)
Model IDs this model accepts as
fallbacks[i].modelon the Messages API. An empty list means thefallbacksparameter is not supported for this model as primary.
-
allowedFallbackModels
final BetaModelInfo.Builder allowedFallbackModels(Optional<List<String>> allowedFallbackModels)
Alias for calling Builder.allowedFallbackModels with
allowedFallbackModels.orElse(null).
-
allowedFallbackModels
final BetaModelInfo.Builder allowedFallbackModels(JsonField<List<String>> allowedFallbackModels)
Sets Builder.allowedFallbackModels to an arbitrary JSON value.
You should usually call Builder.allowedFallbackModels with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAllowedFallbackModel
final BetaModelInfo.Builder addAllowedFallbackModel(String allowedFallbackModel)
Adds a single String to allowedFallbackModels.
-
capabilities
final BetaModelInfo.Builder capabilities(BetaModelCapabilities capabilities)
Model capability information.
-
capabilities
final BetaModelInfo.Builder capabilities(Optional<BetaModelCapabilities> capabilities)
Alias for calling Builder.capabilities with
capabilities.orElse(null).
-
capabilities
final BetaModelInfo.Builder capabilities(JsonField<BetaModelCapabilities> capabilities)
Sets Builder.capabilities to an arbitrary JSON value.
You should usually call Builder.capabilities with a well-typed BetaModelCapabilities value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final BetaModelInfo.Builder createdAt(OffsetDateTime createdAt)
RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.
-
createdAt
final BetaModelInfo.Builder createdAt(JsonField<OffsetDateTime> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
displayName
final BetaModelInfo.Builder displayName(String displayName)
A human-readable name for the model.
-
displayName
final BetaModelInfo.Builder displayName(JsonField<String> displayName)
Sets Builder.displayName to an arbitrary JSON value.
You should usually call Builder.displayName with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxInputTokens
final BetaModelInfo.Builder maxInputTokens(Long maxInputTokens)
Maximum input context window size in tokens for this model.
-
maxInputTokens
final BetaModelInfo.Builder maxInputTokens(Long maxInputTokens)
Alias for Builder.maxInputTokens.
This unboxed primitive overload exists for backwards compatibility.
-
maxInputTokens
final BetaModelInfo.Builder maxInputTokens(Optional<Long> maxInputTokens)
Alias for calling Builder.maxInputTokens with
maxInputTokens.orElse(null).
-
maxInputTokens
final BetaModelInfo.Builder maxInputTokens(JsonField<Long> maxInputTokens)
Sets Builder.maxInputTokens to an arbitrary JSON value.
You should usually call Builder.maxInputTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxTokens
final BetaModelInfo.Builder maxTokens(Long maxTokens)
Maximum value for the
max_tokensparameter when using this model.
-
maxTokens
final BetaModelInfo.Builder maxTokens(Long maxTokens)
Alias for Builder.maxTokens.
This unboxed primitive overload exists for backwards compatibility.
-
maxTokens
final BetaModelInfo.Builder maxTokens(Optional<Long> maxTokens)
Alias for calling Builder.maxTokens with
maxTokens.orElse(null).
-
maxTokens
final BetaModelInfo.Builder maxTokens(JsonField<Long> maxTokens)
Sets Builder.maxTokens to an arbitrary JSON value.
You should usually call Builder.maxTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final BetaModelInfo.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("model")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaModelInfo.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaModelInfo.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaModelInfo.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaModelInfo.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaModelInfo.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaModelInfo build()
Returns an immutable instance of BetaModelInfo.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .allowedFallbackModels() .capabilities() .createdAt() .displayName() .maxInputTokens() .maxTokens()
-
-
-
-