pub struct CompletionResponse<'a> {
pub prompt: &'a Message,
pub content: &'a Vec<AssistantContent>,
pub usage: Usage,
pub message_id: Option<&'a str>,
pub identity: &'a ResponseIdentity,
pub raw: &'a Value,
}Expand description
Canonical non-streaming completion response event.
Fields§
§prompt: &'a MessagePrompt sent for this turn.
content: &'a Vec<AssistantContent>Canonical assistant content returned for this turn.
usage: UsageUsage reported for this turn.
message_id: Option<&'a str>Provider-assigned message ID, when available. Always equal to
identity.message_id; kept as a field for
continuity with pre-identity hooks.
identity: &'a ResponseIdentityThis exact attempt’s response identity metadata (message-scoped, response-scoped, and transport request ids).
raw: &'a ValueThe provider’s own response for this attempt — see
CompletionResponse::raw in rig-core for the exact meaning of the
payload: the value the model’s inherent raw_completion /
raw_stream would have returned, serialized. Every provider seam
populates it; Value::Null only when the response was built without
a provider behind it (a hand-constructed model, a record persisted
before the field). On a retry this is the retried attempt’s own,
never a previous attempt’s.
Trait Implementations§
Source§impl<'a> Clone for CompletionResponse<'a>
impl<'a> Clone for CompletionResponse<'a>
Source§fn clone(&self) -> CompletionResponse<'a>
fn clone(&self) -> CompletionResponse<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more