#[non_exhaustive]pub struct LogprobsResult {
pub top_candidates: Vec<TopCandidates>,
pub chosen_candidates: Vec<Candidate>,
/* private fields */
}Available on crate feature
prediction-service only.Expand description
Logprobs Result
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.top_candidates: Vec<TopCandidates>Length = total number of decoding steps.
chosen_candidates: Vec<Candidate>Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.
Implementations§
Source§impl LogprobsResult
impl LogprobsResult
pub fn new() -> Self
Sourcepub fn set_top_candidates<T, V>(self, v: T) -> Self
pub fn set_top_candidates<T, V>(self, v: T) -> Self
Sets the value of top_candidates.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::logprobs_result::TopCandidates;
let x = LogprobsResult::new()
.set_top_candidates([
TopCandidates::default()/* use setters */,
TopCandidates::default()/* use (different) setters */,
]);Sourcepub fn set_chosen_candidates<T, V>(self, v: T) -> Self
pub fn set_chosen_candidates<T, V>(self, v: T) -> Self
Sets the value of chosen_candidates.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::logprobs_result::Candidate;
let x = LogprobsResult::new()
.set_chosen_candidates([
Candidate::default()/* use setters */,
Candidate::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for LogprobsResult
impl Clone for LogprobsResult
Source§fn clone(&self) -> LogprobsResult
fn clone(&self) -> LogprobsResult
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 Debug for LogprobsResult
impl Debug for LogprobsResult
Source§impl Default for LogprobsResult
impl Default for LogprobsResult
Source§fn default() -> LogprobsResult
fn default() -> LogprobsResult
Returns the “default value” for a type. Read more
Source§impl Message for LogprobsResult
impl Message for LogprobsResult
Source§impl PartialEq for LogprobsResult
impl PartialEq for LogprobsResult
impl StructuralPartialEq for LogprobsResult
Auto Trait Implementations§
impl Freeze for LogprobsResult
impl RefUnwindSafe for LogprobsResult
impl Send for LogprobsResult
impl Sync for LogprobsResult
impl Unpin for LogprobsResult
impl UnwindSafe for LogprobsResult
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