pub struct Model {
pub id: String,
pub model_name: String,
pub match_pattern: String,
pub start_date: Option<Option<String>>,
pub unit: Option<ModelUsageUnit>,
pub input_price: Option<Option<f64>>,
pub output_price: Option<Option<f64>>,
pub total_price: Option<Option<f64>>,
pub tokenizer_id: Option<Option<String>>,
pub tokenizer_config: Option<Option<Value>>,
pub is_langfuse_managed: bool,
pub prices: HashMap<String, ModelPrice>,
}Expand description
Model : Model definition used for transforming usage into USD cost and/or tokenization.
Fields§
§id: String§model_name: StringName 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
match_pattern: StringRegex 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$
start_date: Option<Option<String>>Apply only to generations which are newer than this ISO date.
unit: Option<ModelUsageUnit>§input_price: Option<Option<f64>>Deprecated. See ‘prices’ instead. Price (USD) per input unit
output_price: Option<Option<f64>>Deprecated. See ‘prices’ instead. Price (USD) per output unit
total_price: Option<Option<f64>>Deprecated. See ‘prices’ instead. Price (USD) per total unit. Cannot be set if input or output price is set.
tokenizer_id: Option<Option<String>>Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
tokenizer_config: Option<Option<Value>>Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
is_langfuse_managed: bool§prices: HashMap<String, ModelPrice>Price (USD) by usage type