Class Model.Builder
- All Implemented Interfaces:
Model._FinalStage,Model.IdStage,Model.IsAntsPlatformManagedStage,Model.MatchPatternStage,Model.ModelNameStage
- Enclosing class:
- Model
-
Method Summary
Modifier and TypeMethodDescriptionbuild()inputPrice(Double inputPrice) Deprecated.inputPrice(Optional<Double> inputPrice) isAntsPlatformManaged(boolean isAntsPlatformManaged) matchPattern(String matchPattern) Regex pattern which matches this model definition to generation.model.Name of the model definition.outputPrice(Double outputPrice) Deprecated.outputPrice(Optional<Double> outputPrice) prices(String key, ModelPrice value) Price (USD) by usage typeprices(Map<String, ModelPrice> prices) putAllPrices(Map<String, ModelPrice> prices) Price (USD) by usage typestartDate(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) Deprecated.totalPrice(Optional<Double> totalPrice) unit(ModelUsageUnit unit) Unit used by this model.unit(Optional<ModelUsageUnit> unit)
-
Method Details
-
from
- Specified by:
fromin interfaceModel.IdStage
-
id
- Specified by:
idin interfaceModel.IdStage
-
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 interfaceModel.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 interfaceModel.MatchPatternStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
isAntsPlatformManaged
- Specified by:
isAntsPlatformManagedin interfaceModel.IsAntsPlatformManagedStage
-
prices
Price (USD) by usage type
- Specified by:
pricesin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
putAllPrices
Price (USD) by usage type
- Specified by:
putAllPricesin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
prices
- Specified by:
pricesin interfaceModel._FinalStage
-
tokenizerConfig
Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
- Specified by:
tokenizerConfigin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerConfig
- Specified by:
tokenizerConfigin interfaceModel._FinalStage
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
- Specified by:
tokenizerIdin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
tokenizerId
- Specified by:
tokenizerIdin interfaceModel._FinalStage
-
totalPrice
Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
- Specified by:
totalPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalPrice
- Specified by:
totalPricein interfaceModel._FinalStage
-
outputPrice
Deprecated. See 'prices' instead. Price (USD) per output unit
- Specified by:
outputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
outputPrice
- Specified by:
outputPricein interfaceModel._FinalStage
-
inputPrice
Deprecated. See 'prices' instead. Price (USD) per input unit
- Specified by:
inputPricein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
inputPrice
- Specified by:
inputPricein interfaceModel._FinalStage
-
unit
Unit used by this model.
- Specified by:
unitin interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
unit
- Specified by:
unitin interfaceModel._FinalStage
-
startDate
Apply only to generations which are newer than this ISO date.
- Specified by:
startDatein interfaceModel._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
startDate
- Specified by:
startDatein interfaceModel._FinalStage
-
build
- Specified by:
buildin interfaceModel._FinalStage
-