pub struct ContextPackResponse {
pub schema_version: String,
pub token_budget_tokens: u32,
pub estimated_tokens: u32,
pub truncated: bool,
pub citations_required: bool,
pub answerability_q16: u16,
pub conflict_visibility_q16: u16,
pub visible_conflict_count: u32,
pub cells: Vec<ContextPackCellResponse>,
pub anomalies: Vec<ContextPackAnomalyResponse>,
}Fields§
§schema_version: String§token_budget_tokens: u32§estimated_tokens: u32§truncated: bool§citations_required: bool§answerability_q16: u16§conflict_visibility_q16: u16§visible_conflict_count: u32§cells: Vec<ContextPackCellResponse>§anomalies: Vec<ContextPackAnomalyResponse>Implementations§
Source§impl ContextPackResponse
impl ContextPackResponse
pub const SCHEMA_VERSION_V1: &'static str = CONTEXT_PACK_V1_SCHEMA_VERSION
pub fn is_v1(&self) -> bool
pub fn cell_ids(&self) -> impl Iterator<Item = u64> + '_
pub fn citation_count(&self) -> usize
pub fn anomaly_count(&self, code: &str) -> usize
pub fn is_over_budget(&self) -> bool
pub fn ground_answer(&self, answer: &str) -> AnswerGroundingReportResponse
pub fn ground_answer_with_options( &self, answer: &str, options: AnswerGroundingOptionsResponse, ) -> AnswerGroundingReportResponse
Trait Implementations§
Source§impl Clone for ContextPackResponse
impl Clone for ContextPackResponse
Source§fn clone(&self) -> ContextPackResponse
fn clone(&self) -> ContextPackResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContextPackResponse
impl Debug for ContextPackResponse
Source§impl<'de> Deserialize<'de> for ContextPackResponse
impl<'de> Deserialize<'de> for ContextPackResponse
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
impl Eq for ContextPackResponse
Source§impl PartialEq for ContextPackResponse
impl PartialEq for ContextPackResponse
Source§fn eq(&self, other: &ContextPackResponse) -> bool
fn eq(&self, other: &ContextPackResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextPackResponse
impl Serialize for ContextPackResponse
impl StructuralPartialEq for ContextPackResponse
Auto Trait Implementations§
impl Freeze for ContextPackResponse
impl RefUnwindSafe for ContextPackResponse
impl Send for ContextPackResponse
impl Sync for ContextPackResponse
impl Unpin for ContextPackResponse
impl UnsafeUnpin for ContextPackResponse
impl UnwindSafe for ContextPackResponse
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