pub struct ServingPolicy {
pub budget: u32,
pub cap: usize,
pub pool: usize,
pub rerank_floor: f32,
pub explicit_fact_guard: bool,
}Fields§
§budget: u32§cap: usize§pool: usize§rerank_floor: f32§explicit_fact_guard: boolImplementations§
Source§impl ServingPolicy
impl ServingPolicy
pub fn from_config(config: &ProjectConfig) -> Self
pub fn prepare( &self, request: ContextRequest, reranking: bool, ) -> ContextRequest
pub fn arbitrate( &self, query: &str, bundle: ContextBundle, reranker: Option<&dyn Reranker>, abstain: f32, ) -> ContextBundle
pub fn render_for_query( &self, query: &str, bundle: ContextBundle, compress: bool, exposure_id: &str, ) -> Delivery
pub fn render( &self, bundle: ContextBundle, compress: bool, exposure_id: &str, ) -> Delivery
pub fn retrieve( &self, session: &BrainSession, request: ContextRequest, embedder: &dyn Embedder, reranker: Option<&dyn Reranker>, exposure_id: &str, ) -> KimetsuResult<Delivery>
Trait Implementations§
Source§impl Clone for ServingPolicy
impl Clone for ServingPolicy
Source§fn clone(&self) -> ServingPolicy
fn clone(&self) -> ServingPolicy
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 moreimpl Copy for ServingPolicy
Source§impl Debug for ServingPolicy
impl Debug for ServingPolicy
Auto Trait Implementations§
impl Freeze for ServingPolicy
impl RefUnwindSafe for ServingPolicy
impl Send for ServingPolicy
impl Sync for ServingPolicy
impl Unpin for ServingPolicy
impl UnsafeUnpin for ServingPolicy
impl UnwindSafe for ServingPolicy
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