pub struct ExtractionStatsBuilder<'a> { /* private fields */ }Expand description
Per-call builder returned by Client::extraction_stats.
Awaiting the builder computes extraction accuracy per (provider, model)
over the requested scope slice — a read-only Postgres aggregate, no LLM
call. Each ExtractionStat row carries the total semantic rows produced
and the subset retired as rejected (a wrong extraction the user
corrected); ExtractionStat::accuracy is the derived ratio.
The scope setters narrow the slice and are AND-combined; an unset dimension
imposes no constraint, so the default (no setters) aggregates the whole
store. Use .org(..) for a per-tenant number, add .agent(..) / .user(..)
to narrow further.
§Examples
// Per-model accuracy for one org.
for stat in client.extraction_stats().org("acme").await? {
println!("{}/{}: {:.1}% over {} rows", stat.provider, stat.model, stat.accuracy() * 100.0, stat.total);
}Implementations§
Trait Implementations§
Source§impl<'a> IntoFuture for ExtractionStatsBuilder<'a>
impl<'a> IntoFuture for ExtractionStatsBuilder<'a>
Source§type Output = Result<Vec<ExtractionStat>, ClientError>
type Output = Result<Vec<ExtractionStat>, ClientError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <ExtractionStatsBuilder<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <ExtractionStatsBuilder<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExtractionStatsBuilder<'a>
impl<'a> !UnwindSafe for ExtractionStatsBuilder<'a>
impl<'a> Freeze for ExtractionStatsBuilder<'a>
impl<'a> Send for ExtractionStatsBuilder<'a>
impl<'a> Sync for ExtractionStatsBuilder<'a>
impl<'a> Unpin for ExtractionStatsBuilder<'a>
impl<'a> UnsafeUnpin for ExtractionStatsBuilder<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request