pub struct Candidate {
pub content: Content,
pub safety_ratings: Option<Vec<SafetyRating>>,
pub citation_metadata: Option<CitationMetadata>,
pub finish_reason: Option<String>,
pub usage_metadata: Option<UsageMetadata>,
}
Expand description
A candidate response
Fields§
§content: Content
The content of the candidate
safety_ratings: Option<Vec<SafetyRating>>
The safety ratings for the candidate
citation_metadata: Option<CitationMetadata>
The citation metadata for the candidate
finish_reason: Option<String>
The finish reason for the candidate
usage_metadata: Option<UsageMetadata>
The tokens used in the response
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Candidate
impl<'de> Deserialize<'de> for Candidate
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 Candidate
impl RefUnwindSafe for Candidate
impl Send for Candidate
impl Sync for Candidate
impl Unpin for Candidate
impl UnwindSafe for Candidate
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