Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub struct AnnotatedLlmRequest {Show 19 fields
pub messages: Vec<Message>,
pub model: Option<String>,
pub params: Option<GenerationParams>,
pub tools: Option<Vec<ToolDefinition>>,
pub tool_choice: Option<ToolChoice>,
pub store: Option<bool>,
pub previous_response_id: Option<String>,
pub truncation: Option<Json>,
pub reasoning: Option<Json>,
pub include: Option<Json>,
pub user: Option<String>,
pub metadata: Option<Json>,
pub service_tier: Option<String>,
pub parallel_tool_calls: Option<bool>,
pub max_output_tokens: Option<u64>,
pub max_tool_calls: Option<u64>,
pub top_logprobs: Option<u64>,
pub stream: Option<bool>,
pub extra: Map<String, Json>,
}
Structured view of an LLM request, produced by a Codec from opaque LlmRequest content.
The extra field captures any provider-specific keys not modeled by the known fields, ensuring lossless round-trip through decode/encode.
messages: Vec<Message>Parsed conversation messages.
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<Json>OpenAI Responses: context truncation behavior.
reasoning: Option<Json>OpenAI Responses: reasoning configuration object.
include: Option<Json>OpenAI Responses: include filter for additional output/state items.
user: Option<String>OpenAI user identifier.
metadata: Option<Json>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.
extra: Map<String, Json>Extensible key-value pairs for unmodeled provider-specific fields. Merged back into the request body during encode via serde(flatten).
impl AnnotatedLlmRequestimpl AnnotatedLlmRequest
system_promptpub fn system_prompt(&self) -> Option<&str>
Extract the text content of the first system message, if any.
For MessageContent::Text, returns the string directly. For MessageContent::Parts, returns the text of the first ContentPart::Text part.
last_user_messagepub fn last_user_message(&self) -> Option<&str>
Get the text content of the last user message, if any.
Searches messages in reverse order and returns the first user message found. For MessageContent::Parts, returns the text of the first ContentPart::Text part.
has_tool_callspub fn has_tool_calls(&self) -> 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.
impl Clone for AnnotatedLlmRequestimpl Clone for AnnotatedLlmRequest
clonefn clone(&self) -> AnnotatedLlmRequest
clone_fromfn clone_from(&mut self, source: &Self)
impl Debug for AnnotatedLlmRequestimpl Debug for AnnotatedLlmRequest
fmtfn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for AnnotatedLlmRequestimpl<'de> Deserialize<'de> for AnnotatedLlmRequest
deserializefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for AnnotatedLlmRequestimpl PartialEq for AnnotatedLlmRequest
eqfn eq(&self, other: &AnnotatedLlmRequest) -> bool
nefn ne(&self, other: &Rhs) -> bool
impl Serialize for AnnotatedLlmRequestimpl Serialize for AnnotatedLlmRequest
serializefn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl StructuralPartialEq for AnnotatedLlmRequestimpl StructuralPartialEq for AnnotatedLlmRequest