1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Hanzo Cloud API
*
* 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/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LlmOverview {
/// Available is true whenever the ledger answered — including with no usage in the window, which is honest zeros rather than a missing lens.
#[serde(rename = "available", skip_serializing_if = "Option::is_none")]
pub available: Option<bool>,
/// CompletionTokens is the output half of Tokens.
#[serde(rename = "completionTokens", skip_serializing_if = "Option::is_none")]
pub completion_tokens: Option<i32>,
/// ErrorRate is Errors/Requests, 0..1, rounded to three places. Zero when there were no requests.
#[serde(rename = "errorRate", skip_serializing_if = "Option::is_none")]
pub error_rate: Option<f64>,
/// Errors is how many of Requests failed.
#[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
pub errors: Option<i32>,
/// Models is how many distinct models the org called.
#[serde(rename = "models", skip_serializing_if = "Option::is_none")]
pub models: Option<i32>,
/// PromptTokens is the input half of Tokens.
#[serde(rename = "promptTokens", skip_serializing_if = "Option::is_none")]
pub prompt_tokens: Option<i32>,
/// Providers is how many distinct providers served them.
#[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
pub providers: Option<i32>,
/// Requests is how many LLM calls the org made in the window.
#[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
pub requests: Option<i32>,
/// Source is the warehouse table the lens read.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// SpendCents is what those calls cost, in cents.
#[serde(rename = "spendCents", skip_serializing_if = "Option::is_none")]
pub spend_cents: Option<i32>,
/// Tokens is prompt plus completion tokens over those calls.
#[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
pub tokens: Option<i32>,
}
impl LlmOverview {
pub fn new() -> LlmOverview {
LlmOverview {
available: None,
completion_tokens: None,
error_rate: None,
errors: None,
models: None,
prompt_tokens: None,
providers: None,
requests: None,
source: None,
spend_cents: None,
tokens: None,
}
}
}