Struct Annotated LlmRequest
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: Vec, Option, String, bool, Value, u64, Map
Structured view of an LLM request, produced by a Codec from opaque LlmRequest content.
The extra field captures unknown future top-level keys. Modeled provider-specific controls belong in AnnotatedLlmRequest::api_specific.
Fields
messages: Vec<Message>
Parsed conversation messages.
instructions: Option<MessageContent>
Provider-level instructions that are not part of the conversation array.
Anthropic encodes this as system; OpenAI Responses uses instructions.
model: Option<String>
Model identifier (e.g., "gpt-4", "claude-sonnet-4-20250514").
params: Option<GenerationParams>
Common generation parameters, normalized.
tools: Option<Vec<ToolDefinition>>
Tool definitions (function schemas) available to the model.
tool_choice: Option<ToolChoice>
Tool choice control.
store: Option<bool>
OpenAI Responses: whether to persist response state server-side.
previous_response_id: Option<String>
OpenAI Responses: prior response to continue from.
truncation: Option<Value>
OpenAI Responses: context truncation behavior.
reasoning: Option<Value>
OpenAI Responses: reasoning configuration object.
include: Option<Value>
OpenAI Responses: include filter for additional output/state items.
user: Option<String>
OpenAI user identifier.
metadata: Option<Value>
OpenAI metadata map/object.
service_tier: Option<String>
OpenAI service tier preference.
parallel_tool_calls: Option<bool>
OpenAI tool parallelism toggle.
max_output_tokens: Option<u64>
OpenAI Responses max output token limit.
max_tool_calls: Option<u64>
OpenAI Responses max tool calls.
top_logprobs: Option<u64>
OpenAI logprob fanout count.
stream: Option<bool>
OpenAI streaming toggle.
api_specific: Option<ApiSpecificRequest>
API-specific request data that does not have portable semantics.
extra: Map<String, Value>
Unknown future top-level fields.
Baseline-aware codecs remove deleted keys and overlay changed or added keys without rebuilding untouched provider JSON.
Implementations
impl AnnotatedLlmRequest
Referenced types: AnnotatedLlmRequest
last_message
Referenced types: Option
Select exactly the final supplied request item, without searching backward.
system_prompt
Referenced types: Option, Cow, str
Join text/refusals from instructions, or the first system/developer item.
A selected item without text yields None; later items are not searched.
last_user_message
Referenced types: Option, Cow, str
Join text/refusals from the last user item, without skipping textless items.
has_tool_calls
Referenced types: bool
Check if any assistant message in the conversation contains tool calls.
Returns true if at least one [Message::Assistant] variant has a non-empty tool_calls field.
Trait Implementations
impl Clone for AnnotatedLlmRequest
Referenced types: Clone, AnnotatedLlmRequest
clone
Referenced types: clone, AnnotatedLlmRequest
clone_from
Referenced types: clone_from
impl Debug for AnnotatedLlmRequest
Referenced types: Debug, AnnotatedLlmRequest
fmt
Referenced types: fmt, Formatter, Result, (), Error
impl Default for AnnotatedLlmRequest
Referenced types: Default, AnnotatedLlmRequest
default
Referenced types: default, AnnotatedLlmRequest
impl<'de> Deserialize<'de> for AnnotatedLlmRequest
Referenced types: Deserialize, AnnotatedLlmRequest
deserialize
Referenced types: deserialize, Result, AnnotatedLlmRequest, Deserializer, Error
impl PartialEq for AnnotatedLlmRequest
Referenced types: PartialEq, AnnotatedLlmRequest
eq
Referenced types: eq, AnnotatedLlmRequest, bool
ne
Referenced types: ne, &Rhs, bool
impl Serialize for AnnotatedLlmRequest
Referenced types: Serialize, AnnotatedLlmRequest
serialize
Referenced types: serialize, Result, Serializer, Ok, Error
impl WireValue<AnnotatedLlmRequest> for AnnotatedLlmRequest
Referenced types: AnnotatedLlmRequest
to_wire
Referenced types: Result
from_wire
Referenced types: Result, AnnotatedLlmRequest
impl WireValue<Box<AnnotatedLlmRequest>> for AnnotatedLlmRequest
Referenced types: Box, AnnotatedLlmRequest
to_wire
from_wire
Referenced types: Box, Result, AnnotatedLlmRequest
impl StructuralPartialEq for AnnotatedLlmRequest
Referenced types: StructuralPartialEq, AnnotatedLlmRequest