pub struct CompletionCall {
pub call_index: usize,
pub usage: Usage,
pub identity: ResponseIdentity,
pub finish_reason: Option<FinishReason>,
pub raw: Value,
}Expand description
One completion call of a run: what was asked and what came back.
Fields§
§call_index: usizeZero-based index of the completion request within this agent run.
usage: UsageToken usage reported for this completion request.
A counter the provider did not report is None; a reported zero is
Some(0). Every counter is None when no usage was reported at all.
identity: ResponseIdentityThe response and transport request ids this call reported.
finish_reason: Option<FinishReason>Why this call stopped generating, or None if unreported.
Retained per call so callers can identify which attempt was truncated.
raw: ValueThis attempt’s provider response payload, as defined by
rig_core::completion::CompletionResponse::raw. A stream without a
terminal response produces no completion-call entry.
Implementations§
Trait Implementations§
Source§impl Clone for CompletionCall
impl Clone for CompletionCall
Source§impl Debug for CompletionCall
impl Debug for CompletionCall
Source§impl<'de> Deserialize<'de> for CompletionCall
impl<'de> Deserialize<'de> for CompletionCall
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
Source§impl PartialEq for CompletionCall
impl PartialEq for CompletionCall
Source§impl Serialize for CompletionCall
impl Serialize for CompletionCall
impl StructuralPartialEq for CompletionCall
Auto Trait Implementations§
impl Forget for CompletionCall
impl Freeze for CompletionCall
impl Move for CompletionCall
impl RefUnwindSafe for CompletionCall
impl Send for CompletionCall
impl Sync for CompletionCall
impl Unpin for CompletionCall
impl UnsafeUnpin for CompletionCall
impl UnwindSafe for CompletionCall
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.