pub struct Candidate {
pub content: Content,
pub safety_ratings: Option<Vec<SafetyRating>>,
pub citation_metadata: Option<CitationMetadata>,
pub finish_reason: Option<FinishReason>,
pub grounding_attributions: Option<Vec<GroundingAtrribution>>,
}Fields§
§content: ContentGenerated content returned from the model.
safety_ratings: Option<Vec<SafetyRating>>List of ratings for the safety of a response candidate.
There is at most one rating per category.
citation_metadata: Option<CitationMetadata>Citation information for model-generated candidate.
This field may be populated with recitation information for any text included in the [content]. These are passages that are “recited” from copyrighted material in the foundational LLM’s training data.
finish_reason: Option<FinishReason>The reason why the model stopped generating tokens.
If None, the model has not stopped generating the tokens.
grounding_attributions: Option<Vec<GroundingAtrribution>>Implementations§
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