pub struct StateBody {
pub model: String,
pub provider: String,
pub engine: String,
pub mode: String,
pub cost_usd: f64,
pub total_tokens: usize,
pub call_count: usize,
pub context_tokens: usize,
pub context_window: usize,
pub context_pct: u8,
pub message_count: usize,
}Expand description
Everything a client needs to render a status bar.
Fields§
§model: String§provider: String§engine: String§mode: String§cost_usd: f64§total_tokens: usize§call_count: usize§context_tokens: usizeInput tokens of the most recent model call — what the agent actually sent as context on its last turn.
context_window: usizeapollo’s own compaction budget (agent.max_context_chars) expressed in
tokens at four characters per token. It is the threshold the status bar
should measure against, not the provider’s hard window.
context_pct: u8§message_count: usizeStored messages for the chat this state was asked about — chat_id on
the query string, or the default chat when it is absent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StateBody
impl<'de> Deserialize<'de> for StateBody
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 StructuralPartialEq for StateBody
Auto Trait Implementations§
impl Freeze for StateBody
impl RefUnwindSafe for StateBody
impl Send for StateBody
impl Sync for StateBody
impl Unpin for StateBody
impl UnsafeUnpin for StateBody
impl UnwindSafe for StateBody
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more