Class CreateModelRequest.Builder
- All Implemented Interfaces:
CreateModelRequest._FinalStage, CreateModelRequest.MatchPatternStage, CreateModelRequest.ModelNameStage
- Enclosing class:
CreateModelRequest
-
Method Summary
Modifier and TypeMethodDescriptionbuild()from(CreateModelRequest other) inputPrice(Double inputPrice) Price (USD) per input unitinputPrice(Optional<Double> inputPrice) matchPattern(String matchPattern) Regex pattern which matches this model definition to generation.model.Name of the model definition.outputPrice(Double outputPrice) Price (USD) per output unitoutputPrice(Optional<Double> outputPrice) startDate(OffsetDateTime startDate) Apply only to generations which are newer than this ISO date.startDate(Optional<OffsetDateTime> startDate) tokenizerConfig(Object tokenizerConfig) Optional.tokenizerConfig(Optional<Object> tokenizerConfig) tokenizerId(String tokenizerId) Optional.tokenizerId(Optional<String> tokenizerId) totalPrice(Double totalPrice) Price (USD) per total units.totalPrice(Optional<Double> totalPrice) unit(ModelUsageUnit unit) Unit used by this model.unit(Optional<ModelUsageUnit> unit)
-
Method Details
-
from
- Specified by:
fromin interfaceCreateModelRequest.ModelNameStage
-
modelName
Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
- Specified by:
modelNamein interfaceCreateModelRequest.ModelNameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
matchPattern
Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use
(?i)^modelname$- Specified by:
matchPatternin interfaceCreateModelRequest.MatchPatternStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerConfig
Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
- Specified by:
tokenizerConfigin interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerConfig
- Specified by:
tokenizerConfigin interfaceCreateModelRequest._FinalStage
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
- Specified by:
tokenizerIdin interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerId
- Specified by:
tokenizerIdin interfaceCreateModelRequest._FinalStage
-
totalPrice
Price (USD) per total units. Cannot be set if input or output price is set.
- Specified by:
totalPricein interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalPrice
- Specified by:
totalPricein interfaceCreateModelRequest._FinalStage
-
outputPrice
Price (USD) per output unit
- Specified by:
outputPricein interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
outputPrice
- Specified by:
outputPricein interfaceCreateModelRequest._FinalStage
-
inputPrice
Price (USD) per input unit
- Specified by:
inputPricein interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inputPrice
- Specified by:
inputPricein interfaceCreateModelRequest._FinalStage
-
unit
Unit used by this model.
- Specified by:
unitin interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
unit
- Specified by:
unitin interfaceCreateModelRequest._FinalStage
-
startDate
Apply only to generations which are newer than this ISO date.
- Specified by:
startDatein interfaceCreateModelRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
startDate
- Specified by:
startDatein interfaceCreateModelRequest._FinalStage
-
build
- Specified by:
buildin interfaceCreateModelRequest._FinalStage
-