pub struct Candidate {
pub content: Option<Content>,
pub citation_metadata: Option<CitationMetadata>,
pub finish_message: Option<String>,
pub token_count: Option<i64>,
pub avg_logprobs: Option<f64>,
pub finish_reason: Option<FinishReason>,
pub grounding_metadata: Option<GroundingMetadata>,
pub index: Option<i64>,
pub logprobs_result: Option<LogprobsResult>,
pub safety_ratings: Option<Vec<SafetyRating>>,
}Fields§
§content: Option<Content>§citation_metadata: Option<CitationMetadata>§finish_message: Option<String>§token_count: Option<i64>§avg_logprobs: Option<f64>§finish_reason: Option<FinishReason>§grounding_metadata: Option<GroundingMetadata>§index: Option<i64>§logprobs_result: Option<LogprobsResult>§safety_ratings: Option<Vec<SafetyRating>>Implementations§
Source§impl Candidate
impl Candidate
Sourcepub fn citation_metadata(self, value: impl Into<CitationMetadata>) -> Self
pub fn citation_metadata(self, value: impl Into<CitationMetadata>) -> Self
Sets the citation_metadata field of this struct.
Sourcepub fn finish_message(self, value: impl Into<String>) -> Self
pub fn finish_message(self, value: impl Into<String>) -> Self
Sets the finish_message field of this struct.
Sourcepub fn token_count(self, value: impl Into<i64>) -> Self
pub fn token_count(self, value: impl Into<i64>) -> Self
Sets the token_count field of this struct.
Sourcepub fn avg_logprobs(self, value: impl Into<f64>) -> Self
pub fn avg_logprobs(self, value: impl Into<f64>) -> Self
Sets the avg_logprobs field of this struct.
Sourcepub fn finish_reason(self, value: impl Into<FinishReason>) -> Self
pub fn finish_reason(self, value: impl Into<FinishReason>) -> Self
Sets the finish_reason field of this struct.
Sourcepub fn grounding_metadata(self, value: impl Into<GroundingMetadata>) -> Self
pub fn grounding_metadata(self, value: impl Into<GroundingMetadata>) -> Self
Sets the grounding_metadata field of this struct.
Sourcepub fn logprobs_result(self, value: impl Into<LogprobsResult>) -> Self
pub fn logprobs_result(self, value: impl Into<LogprobsResult>) -> Self
Sets the logprobs_result field of this struct.
Sourcepub fn safety_ratings(self, value: impl Into<Vec<SafetyRating>>) -> Self
pub fn safety_ratings(self, value: impl Into<Vec<SafetyRating>>) -> Self
Sets the safety_ratings field of this struct.
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