pub struct ObservationsView {Show 32 fields
pub id: String,
pub trace_id: Option<String>,
pub type: String,
pub name: Option<String>,
pub start_time: DateTime<FixedOffset>,
pub end_time: Option<DateTime<FixedOffset>>,
pub completion_start_time: Option<DateTime<FixedOffset>>,
pub model: Option<String>,
pub model_parameters: Option<Value>,
pub input: Option<Value>,
pub version: Option<String>,
pub metadata: Option<Option<HashMap<String, Value>>>,
pub output: Option<Value>,
pub usage: Box<Usage>,
pub level: ObservationLevel,
pub status_message: Option<String>,
pub parent_observation_id: Option<String>,
pub prompt_id: Option<String>,
pub usage_details: HashMap<String, i32>,
pub cost_details: HashMap<String, f64>,
pub environment: String,
pub prompt_name: Option<String>,
pub prompt_version: Option<i32>,
pub model_id: Option<String>,
pub input_price: Option<f64>,
pub output_price: Option<f64>,
pub total_price: Option<f64>,
pub calculated_input_cost: Option<f64>,
pub calculated_output_cost: Option<f64>,
pub calculated_total_cost: Option<f64>,
pub latency: Option<f64>,
pub time_to_first_token: Option<f64>,
}Fields§
§id: StringThe unique identifier of the observation
trace_id: Option<String>The trace ID associated with the observation
type: StringThe type of the observation
name: Option<String>The name of the observation
start_time: DateTime<FixedOffset>The start time of the observation
end_time: Option<DateTime<FixedOffset>>The end time of the observation.
completion_start_time: Option<DateTime<FixedOffset>>The completion start time of the observation
model: Option<String>The model used for the observation
model_parameters: Option<Value>The parameters of the model used for the observation
input: Option<Value>The input data of the observation
version: Option<String>The version of the observation
metadata: Option<Option<HashMap<String, Value>>>Additional metadata of the observation
output: Option<Value>The output data of the observation
usage: Box<Usage>§level: ObservationLevel§status_message: Option<String>The status message of the observation
parent_observation_id: Option<String>The parent observation ID
prompt_id: Option<String>The prompt ID associated with the observation
usage_details: 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: 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: StringThe 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<String>The name of the prompt associated with the observation
prompt_version: Option<i32>The version of the prompt associated with the observation
model_id: Option<String>The unique identifier of the model
input_price: Option<f64>The price of the input in USD
output_price: Option<f64>The price of the output in USD.
total_price: Option<f64>The total price in USD.
calculated_input_cost: Option<f64>(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the input in USD
calculated_output_cost: Option<f64>(Deprecated. Use usageDetails and costDetails instead.) The calculated cost of the output in USD
calculated_total_cost: Option<f64>(Deprecated. Use usageDetails and costDetails instead.) The calculated total cost in USD
latency: Option<f64>The latency in seconds.
time_to_first_token: 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