pub struct AiResponse {
pub text: String,
pub metrics: InvocationMetrics,
}Expand description
An AI response paired with its per-invocation InvocationMetrics.
Returned by AiClient::send_request_with_metrics. The plain
send_request /
send_request_with_options paths
keep returning a bare String, so existing call sites are unaffected;
telemetry-aware callers opt in via the metrics method.
Fields§
§text: StringThe model’s text response.
metrics: InvocationMetricsPer-invocation telemetry (cost, …).
Trait Implementations§
Source§impl Clone for AiResponse
impl Clone for AiResponse
Source§fn clone(&self) -> AiResponse
fn clone(&self) -> AiResponse
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 moreAuto Trait Implementations§
impl Freeze for AiResponse
impl RefUnwindSafe for AiResponse
impl Send for AiResponse
impl Sync for AiResponse
impl Unpin for AiResponse
impl UnsafeUnpin for AiResponse
impl UnwindSafe for AiResponse
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