pub struct GenerationUsage {
pub prompt_tokens: u64,
pub completion_tokens: u64,
pub total_tokens: u64,
pub credits_charged: Option<u64>,
pub rate_book_version: Option<String>,
}Expand description
Token counts for a native generation.
Fields§
§prompt_tokens: u64§completion_tokens: u64§total_tokens: u64§credits_charged: Option<u64>§rate_book_version: Option<String>Trait Implementations§
Source§impl Clone for GenerationUsage
impl Clone for GenerationUsage
Source§fn clone(&self) -> GenerationUsage
fn clone(&self) -> GenerationUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenerationUsage
impl Debug for GenerationUsage
Source§impl Default for GenerationUsage
impl Default for GenerationUsage
Source§fn default() -> GenerationUsage
fn default() -> GenerationUsage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenerationUsage
impl<'de> Deserialize<'de> for GenerationUsage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GenerationUsage
Source§impl PartialEq for GenerationUsage
impl PartialEq for GenerationUsage
Source§impl Serialize for GenerationUsage
impl Serialize for GenerationUsage
impl StructuralPartialEq for GenerationUsage
Auto Trait Implementations§
impl Freeze for GenerationUsage
impl RefUnwindSafe for GenerationUsage
impl Send for GenerationUsage
impl Sync for GenerationUsage
impl Unpin for GenerationUsage
impl UnsafeUnpin for GenerationUsage
impl UnwindSafe for GenerationUsage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.