Skip to main content

hanzo_client/models/
model_row.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ModelRow {
16    /// Model is the model id, e.g. zen5-coder.
17    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
18    pub model: Option<String>,
19    /// Pct is this model's share of the window's returned spend, 0..100, one decimal.
20    #[serde(rename = "pct", skip_serializing_if = "Option::is_none")]
21    pub pct: Option<f64>,
22    /// Provider is who served it.
23    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
24    pub provider: Option<String>,
25    /// Requests is how many calls went to this model.
26    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
27    pub requests: Option<i32>,
28    /// SpendCents is what they cost, in cents.
29    #[serde(rename = "spendCents", skip_serializing_if = "Option::is_none")]
30    pub spend_cents: Option<i32>,
31    /// Tokens is prompt plus completion tokens over those calls.
32    #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
33    pub tokens: Option<i32>,
34}
35
36impl ModelRow {
37    pub fn new() -> ModelRow {
38        ModelRow {
39            model: None,
40            pct: None,
41            provider: None,
42            requests: None,
43            spend_cents: None,
44            tokens: None,
45        }
46    }
47}
48