pub struct ObservationsView {Show 32 fields
pub id: String,
pub trace_id: Option<Option<String>>,
pub type: String,
pub name: Option<Option<String>>,
pub start_time: String,
pub end_time: Option<Option<String>>,
pub completion_start_time: Option<Option<String>>,
pub model: Option<Option<String>>,
pub model_parameters: Option<Option<HashMap<String, MapValue>>>,
pub input: Option<Option<Value>>,
pub version: Option<Option<String>>,
pub metadata: Option<Option<Value>>,
pub output: Option<Option<Value>>,
pub usage: Option<Box<Usage>>,
pub level: ObservationLevel,
pub status_message: Option<Option<String>>,
pub parent_observation_id: Option<Option<String>>,
pub prompt_id: Option<Option<String>>,
pub usage_details: Option<Option<HashMap<String, i32>>>,
pub cost_details: Option<Option<HashMap<String, f64>>>,
pub environment: Option<Option<String>>,
pub prompt_name: Option<Option<String>>,
pub prompt_version: Option<Option<i32>>,
pub model_id: Option<Option<String>>,
pub input_price: Option<Option<f64>>,
pub output_price: Option<Option<f64>>,
pub total_price: Option<Option<f64>>,
pub calculated_input_cost: Option<Option<f64>>,
pub calculated_output_cost: Option<Option<f64>>,
pub calculated_total_cost: Option<Option<f64>>,
pub latency: Option<Option<f64>>,
pub time_to_first_token: Option<Option<f64>>,
}Fields§
§id: StringThe unique identifier of the observation
trace_id: Option<Option<String>>The trace ID associated with the observation
type: StringThe type of the observation
name: Option<Option<String>>The name of the observation
start_time: StringThe start time of the observation
end_time: Option<Option<String>>The end time of the observation.
completion_start_time: Option<Option<String>>The completion start time of the observation
model: Option<Option<String>>The model used for the observation
model_parameters: Option<Option<HashMap<String, MapValue>>>The parameters of the model used for the observation
input: Option<Option<Value>>The input data of the observation
version: Option<Option<String>>The version of the observation
metadata: Option<Option<Value>>Additional metadata of the observation
output: Option<Option<Value>>The output data of the observation
usage: Option<Box<Usage>>§level: ObservationLevel§status_message: Option<Option<String>>The status message of the observation
parent_observation_id: Option<Option<String>>The parent observation ID
prompt_id: Option<Option<String>>The prompt ID associated with the observation
usage_details: Option<Option<HashMap<String, i32>>>The usage details of the observation. Key is the name of the usage metric, value is the number of units consumed. The total key is the sum of all (non-total) usage metrics or the total value ingested.
cost_details: Option<Option<HashMap<String, f64>>>The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested.
environment: Option<Option<String>>The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with ‘langfuse’.
prompt_name: Option<Option<String>>The name of the prompt associated with the observation
prompt_version: Option<Option<i32>>The version of the prompt associated with the observation
model_id: Option<Option<String>>The unique identifier of the model
input_price: Option<Option<f64>>The price of the input in USD
output_price: Option<Option<f64>>The price of the output in USD.
total_price: Option<Option<f64>>The total price in USD.
calculated_input_cost: Option<Option<f64>>(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the input in USD
calculated_output_cost: Option<Option<f64>>(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the output in USD
calculated_total_cost: Option<Option<f64>>(Deprecated. Use usageDetails and costDetails instead.) The calculated total cost in USD
latency: Option<Option<f64>>The latency in seconds.
time_to_first_token: Option<Option<f64>>The time to the first token in seconds
Implementations§
Source§impl ObservationsView
impl ObservationsView
Sourcepub fn builder() -> ObservationsViewBuilder
pub fn builder() -> ObservationsViewBuilder
Create an instance of ObservationsView using the builder syntax
Source§impl ObservationsView
impl ObservationsView
pub fn new( id: String, type: String, start_time: String, level: ObservationLevel, ) -> ObservationsView
Trait Implementations§
Source§impl Clone for ObservationsView
impl Clone for ObservationsView
Source§fn clone(&self) -> ObservationsView
fn clone(&self) -> ObservationsView
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more