Struct Agent Usage
Generated from cargo doc --no-deps -p nemo-fabric-core.
pub struct AgentUsage {
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub total_tokens: Option<u64>,
pub cost_usd: Option<f64>,
pub extensions: BTreeMap<String, Value>,
}
Normalized model usage reported by an adapter target.
Fields
input_tokens: Option<u64>
Input tokens consumed by the invocation.
output_tokens: Option<u64>
Output tokens produced by the invocation.
total_tokens: Option<u64>
Total tokens reported by the provider.
cost_usd: Option<f64>
Invocation cost in US dollars when reported by the provider.
extensions: BTreeMap<String, Value>
Adapter-owned usage fields.
Trait Implementations
impl Clone for AgentUsage
impl Clone for AgentUsage
clone
fn clone(&self) -> AgentUsage
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for AgentUsage
impl Debug for AgentUsage
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for AgentUsage
impl Default for AgentUsage
default
fn default() -> AgentUsage
impl<'de> Deserialize<'de> for AgentUsage
impl<'de> Deserialize<'de> for AgentUsage
deserialize
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl JsonSchema for AgentUsage
impl JsonSchema for AgentUsage
schema_name
fn schema_name() -> Cow<'static, str>
schema_id
fn schema_id() -> Cow<'static, str>
json_schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
inline_schema
fn inline_schema() -> bool
impl PartialEq for AgentUsage
impl PartialEq for AgentUsage
eq
fn eq(&self, other: &AgentUsage) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl Serialize for AgentUsage
impl Serialize for AgentUsage
serialize
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl StructuralPartialEq for AgentUsage
impl StructuralPartialEq for AgentUsage