pub struct OutputUsage {
pub input_tokens: Option<i64>,
pub output_tokens: Option<i64>,
}Expand description
Token usage for the request.
Fields§
§input_tokens: Option<i64>Number of input tokens processed for the request.
output_tokens: Option<i64>Number of output tokens generated for the answers.
Implementations§
Source§impl OutputUsage
impl OutputUsage
pub fn builder() -> OutputUsage
Trait Implementations§
Source§impl Clone for OutputUsage
impl Clone for OutputUsage
Source§impl Debug for OutputUsage
impl Debug for OutputUsage
Source§impl Default for OutputUsage
impl Default for OutputUsage
Source§impl<'de> Deserialize<'de> for OutputUsage
impl<'de> Deserialize<'de> for OutputUsage
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
Source§impl From<OutputUsage> for OutputUsage
impl From<OutputUsage> for OutputUsage
Source§fn from(value: OutputUsage) -> Self
fn from(value: OutputUsage) -> Self
Converts to this type from the input type.
Source§impl Serialize for OutputUsage
impl Serialize for OutputUsage
Source§impl TryFrom<OutputUsage> for OutputUsage
impl TryFrom<OutputUsage> for OutputUsage
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: OutputUsage) -> Result<Self, ConversionError>
fn try_from(value: OutputUsage) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Forget for OutputUsage
impl Freeze for OutputUsage
impl Move for OutputUsage
impl RefUnwindSafe for OutputUsage
impl Send for OutputUsage
impl Sync for OutputUsage
impl Unpin for OutputUsage
impl UnsafeUnpin for OutputUsage
impl UnwindSafe for OutputUsage
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