Skip to main content

hanzo_client/models/
trace_view.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 TraceView {
16    /// APIKeyHash is the non-reversible credential ref (never a plaintext key), so a trace correlates to the key that drove it without the store holding a secret.
17    #[serde(rename = "apiKeyHash", skip_serializing_if = "Option::is_none")]
18    pub api_key_hash: Option<String>,
19    /// ItemID is the example the call answered.
20    #[serde(rename = "datasetItemId", skip_serializing_if = "Option::is_none")]
21    pub dataset_item_id: Option<String>,
22    /// Dataset is the set the graded example came from.
23    #[serde(rename = "datasetName", skip_serializing_if = "Option::is_none")]
24    pub dataset_name: Option<String>,
25    /// EndTime is when it returned.
26    #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")]
27    pub end_time: Option<String>,
28    /// ID is the trace's handle, the value a score points at.
29    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
30    pub id: Option<String>,
31    /// Input is what the model was given.
32    #[serde(rename = "input", skip_serializing_if = "Option::is_none")]
33    pub input: Option<serde_json::Value>,
34    /// LatencyMs is EndTime-StartTime in milliseconds, nil when the trace carries no timing (so the console renders \"—\", never a fabricated 0).
35    #[serde(rename = "latencyMs", skip_serializing_if = "Option::is_none")]
36    pub latency_ms: Option<f64>,
37    /// Model is the model that answered.
38    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
39    pub model: Option<String>,
40    /// Name is the trace's label, \"eval:<run>\" for a call a run made.
41    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
42    pub name: Option<String>,
43    /// Output is what it answered.
44    #[serde(rename = "output", skip_serializing_if = "Option::is_none")]
45    pub output: Option<String>,
46    /// ProjectID is the sub-scope within the org the call was made under.
47    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
48    pub project_id: Option<String>,
49    /// RunName is the run the call belongs to.
50    #[serde(rename = "runName", skip_serializing_if = "Option::is_none")]
51    pub run_name: Option<String>,
52    /// SessionID groups the calls of one run.
53    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
54    pub session_id: Option<String>,
55    /// StartTime is when the call began.
56    #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")]
57    pub start_time: Option<String>,
58    /// Timestamp is the trace's own clock, equal to StartTime for a timed call.
59    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
60    pub timestamp: Option<String>,
61}
62
63impl TraceView {
64    pub fn new() -> TraceView {
65        TraceView {
66            api_key_hash: None,
67            dataset_item_id: None,
68            dataset_name: None,
69            end_time: None,
70            id: None,
71            input: None,
72            latency_ms: None,
73            model: None,
74            name: None,
75            output: None,
76            project_id: None,
77            run_name: None,
78            session_id: None,
79            start_time: None,
80            timestamp: None,
81        }
82    }
83}
84