pub struct Response {
pub text: String,
pub usage: Usage,
}Expand description
What every provider returns. We keep this minimal — text is the
raw string the model produced (the caller parses it), usage
surfaces token counts so callers can verify cache hits.
Fields§
§text: StringThe raw text content of the assistant’s reply. Caller is
responsible for JSON-parsing it (per the prompt template, this
will be {"sql": "...", "explanation": "..."} on success).
usage: UsageAuto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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