Struct Annotated LlmResponse
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
Referenced types: Option, String, Vec, Usage, LlmOptimizationSummary, Map, Value
Structured view of an LLM response, produced by a response codec from raw JSON API output.
The extra field captures any top-level keys not modeled by the known fields, ensuring lossless round-trip through serde.
Fields
id: Option<String>
Response ID from the API (e.g., “chatcmpl-abc123”, “resp_abc123”, “msg_abc123”).
model: Option<String>
The model that actually served the request (may differ from requested model).
message: Option<MessageContent>
The assistant’s response content, reusing [MessageContent] from request types.
reasoning_parts: Vec<ReasoningPart>
Ordered disclosed reasoning and summaries. The separate wire name preserves historical provider extras named reasoning.
tool_calls: Option<Vec<ResponseToolCall>>
Tool calls requested by the model, normalized across APIs.
Uses [ResponseToolCall] (arguments as Json) NOT the request-side ToolCall (arguments as String).
finish_reason: Option<FinishReason>
Why generation stopped, normalized across APIs.
usage: Option<Usage>
Token usage statistics.
optimization_summary: Option<LlmOptimizationSummary>
Plugin-neutral optimization accounting computed by Relay at LLM close.
api_specific: Option<ApiSpecificResponse>
API-specific response data that cannot be normalized across providers.
extra: Map<String, Value>
Catch-all for unmodeled top-level fields, ensuring lossless round-trip.
Implementations
impl AnnotatedLlmResponse
Referenced types: AnnotatedLlmResponse
output
Inspect current normalized content followed by separate tool calls.
This does not reconstruct provider ordering between those fields.
response_text
Referenced types: Option, Cow, str
Join all explicit text/refusals in the current output, excluding tools.
has_tool_calls
Referenced types: bool
Check if the response contains any tool calls.
Returns true if tool_calls is Some with at least one element.
Trait Implementations
impl Clone for AnnotatedLlmResponse
Referenced types: Clone, AnnotatedLlmResponse
clone
Referenced types: clone, AnnotatedLlmResponse
clone_from
Referenced types: clone_from
impl Debug for AnnotatedLlmResponse
Referenced types: Debug, AnnotatedLlmResponse
fmt
Referenced types: fmt, Formatter, Result, (), Error
impl Default for AnnotatedLlmResponse
Referenced types: Default, AnnotatedLlmResponse
default
Referenced types: default, AnnotatedLlmResponse
impl<'de> Deserialize<'de> for AnnotatedLlmResponse
Referenced types: Deserialize, AnnotatedLlmResponse
deserialize
Referenced types: deserialize, Result, AnnotatedLlmResponse, Deserializer, Error
impl PartialEq for AnnotatedLlmResponse
Referenced types: PartialEq, AnnotatedLlmResponse
eq
Referenced types: eq, AnnotatedLlmResponse, bool
ne
Referenced types: ne, &Rhs, bool
impl Serialize for AnnotatedLlmResponse
Referenced types: Serialize, AnnotatedLlmResponse
serialize
Referenced types: serialize, Result, Serializer, Ok, Error
impl StructuralPartialEq for AnnotatedLlmResponse
Referenced types: StructuralPartialEq, AnnotatedLlmResponse