pub struct GenerateContentResponseUsageMetadata {
pub cache_tokens_details: Option<Vec<ModalityTokenCount>>,
pub cached_content_token_count: Option<i32>,
pub candidates_token_count: Option<i32>,
pub candidates_tokens_details: Option<Vec<ModalityTokenCount>>,
pub prompt_token_count: Option<i32>,
pub prompt_tokens_details: Option<Vec<ModalityTokenCount>>,
pub thoughts_token_count: Option<i32>,
pub tool_use_prompt_token_count: Option<i32>,
pub tool_use_prompt_tokens_details: Option<Vec<ModalityTokenCount>>,
pub total_token_count: Option<i32>,
pub traffic_type: Option<TrafficType>,
}Expand description
GenerateContentResponse 使用的 usage metadata(包含 candidates 统计)。
Fields§
§cache_tokens_details: Option<Vec<ModalityTokenCount>>§cached_content_token_count: Option<i32>§candidates_token_count: Option<i32>§candidates_tokens_details: Option<Vec<ModalityTokenCount>>§prompt_token_count: Option<i32>§prompt_tokens_details: Option<Vec<ModalityTokenCount>>§thoughts_token_count: Option<i32>§tool_use_prompt_token_count: Option<i32>§tool_use_prompt_tokens_details: Option<Vec<ModalityTokenCount>>§total_token_count: Option<i32>§traffic_type: Option<TrafficType>Trait Implementations§
Source§impl Clone for GenerateContentResponseUsageMetadata
impl Clone for GenerateContentResponseUsageMetadata
Source§fn clone(&self) -> GenerateContentResponseUsageMetadata
fn clone(&self) -> GenerateContentResponseUsageMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for GenerateContentResponseUsageMetadata
impl<'de> Deserialize<'de> for GenerateContentResponseUsageMetadata
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
Auto Trait Implementations§
impl Freeze for GenerateContentResponseUsageMetadata
impl RefUnwindSafe for GenerateContentResponseUsageMetadata
impl Send for GenerateContentResponseUsageMetadata
impl Sync for GenerateContentResponseUsageMetadata
impl Unpin for GenerateContentResponseUsageMetadata
impl UnsafeUnpin for GenerateContentResponseUsageMetadata
impl UnwindSafe for GenerateContentResponseUsageMetadata
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