pub struct ModelCost {
pub type: Type,
pub model: Value,
pub prompt_tokens: f64,
pub completion_tokens: f64,
pub cost: f64,
}Fields§
§type: TypeThis is the type of cost, always ‘model’ for this class.
model: ValueThis is the model that was used during the call. This matches one of the following: - call.assistant.model, - call.assistantId->model, - call.squad[n].assistant.model, - call.squad[n].assistantId->model, - call.squadId->[n].assistant.model, - call.squadId->[n].assistantId->model.
prompt_tokens: f64This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used.
completion_tokens: f64This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used.
cost: f64This is the cost of the component in USD.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelCost
impl<'de> Deserialize<'de> for ModelCost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl OpenApi for ModelCost
impl OpenApi for ModelCost
Source§fn openapi() -> OpenApi
fn openapi() -> OpenApi
openapi::OpenApi instance which can be parsed with serde or served via
OpenAPI visualization tool such as Swagger UI.