Skip to navigation

Struct LlmRequest Intercept Outcome

View as MarkdownOpen in Claude

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.

pub struct LlmRequestInterceptOutcome {
pub request: LlmRequest,
pub annotated_request: Option<AnnotatedLlmRequest>,
pub pending_marks: Vec<PendingMarkSpec>,
pub optimization_contributions: Vec<LlmOptimizationContribution>,
}

Referenced types: LlmRequest, Option, AnnotatedLlmRequest, Vec, PendingMarkSpec, LlmOptimizationContribution

Result of an LLM request intercept that can schedule lifecycle marks.

Fields

request: LlmRequest

Rewritten provider request when no request codec is active.

With a request codec, callbacks may rewrite headers, but content is read-only and provider-body changes must be made through Self::annotated_request.

annotated_request: Option<AnnotatedLlmRequest>

Optional normalized request annotation to carry forward.

This is required and authoritative for provider content when a request codec is active. It remains optional when no request codec is active.

pending_marks: Vec<PendingMarkSpec>

Ordered marks to emit after Relay creates and starts the LLM scope.

optimization_contributions: Vec<LlmOptimizationContribution>

Ordered plugin-neutral optimization evidence for this LLM call.

Implementations

impl LlmRequestInterceptOutcome

impl LlmRequestInterceptOutcome

Referenced types: LlmRequestInterceptOutcome

new

pub fn new(
request: LlmRequest,
annotated_request: Option<AnnotatedLlmRequest>,
) -> LlmRequestInterceptOutcome

Referenced types: LlmRequest, Option, AnnotatedLlmRequest, LlmRequestInterceptOutcome

Create an outcome without pending marks.

with_pending_mark

pub fn with_pending_mark(
self,
mark: PendingMarkSpec,
) -> LlmRequestInterceptOutcome

Referenced types: PendingMarkSpec, LlmRequestInterceptOutcome

Append one pending mark while preserving interceptor order.

with_optimization_contribution

pub fn with_optimization_contribution(
self,
contribution: LlmOptimizationContribution,
) -> LlmRequestInterceptOutcome

Referenced types: LlmOptimizationContribution, LlmRequestInterceptOutcome

Append one optimization contribution while preserving interceptor order.

Trait Implementations

impl Clone for LlmRequestInterceptOutcome

impl Clone for LlmRequestInterceptOutcome

Referenced types: Clone, LlmRequestInterceptOutcome

clone

fn clone(&self) -> LlmRequestInterceptOutcome

Referenced types: clone, LlmRequestInterceptOutcome

clone_from

fn clone_from(&mut self, source: &Self)

Referenced types: clone_from

impl Debug for LlmRequestInterceptOutcome

impl Debug for LlmRequestInterceptOutcome

Referenced types: Debug, LlmRequestInterceptOutcome

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Referenced types: fmt, Formatter, Result, (), Error

impl<'de> Deserialize<'de> for LlmRequestInterceptOutcome

impl<'de> Deserialize<'de> for LlmRequestInterceptOutcome

Referenced types: Deserialize, LlmRequestInterceptOutcome

deserialize

fn deserialize<__D>(
__deserializer: __D,
) -> Result<LlmRequestInterceptOutcome, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,

Referenced types: deserialize, Result, LlmRequestInterceptOutcome, Deserializer, Error

impl From<(LlmRequest, AnnotatedLlmRequest)> for LlmRequestInterceptOutcome

impl From<(LlmRequest, AnnotatedLlmRequest)> for LlmRequestInterceptOutcome

Referenced types: From, LlmRequest, AnnotatedLlmRequest, LlmRequestInterceptOutcome

from

fn from(_: (LlmRequest, AnnotatedLlmRequest)) -> LlmRequestInterceptOutcome

Referenced types: from, LlmRequest, AnnotatedLlmRequest, LlmRequestInterceptOutcome

impl From<(LlmRequest, Option<AnnotatedLlmRequest>)> for LlmRequestInterceptOutcome

impl From<(LlmRequest, Option<AnnotatedLlmRequest>)> for LlmRequestInterceptOutcome

Referenced types: From, LlmRequest, Option, AnnotatedLlmRequest, LlmRequestInterceptOutcome

from

fn from(
_: (LlmRequest, Option<AnnotatedLlmRequest>),
) -> LlmRequestInterceptOutcome

Referenced types: from, LlmRequest, Option, AnnotatedLlmRequest, LlmRequestInterceptOutcome

impl From<LlmRequest> for LlmRequestInterceptOutcome

impl From<LlmRequest> for LlmRequestInterceptOutcome

Referenced types: From, LlmRequest, LlmRequestInterceptOutcome

from

fn from(request: LlmRequest) -> LlmRequestInterceptOutcome

Referenced types: from, LlmRequest, LlmRequestInterceptOutcome

impl PartialEq for LlmRequestInterceptOutcome

impl PartialEq for LlmRequestInterceptOutcome

Referenced types: PartialEq, LlmRequestInterceptOutcome

eq

fn eq(&self, other: &LlmRequestInterceptOutcome) -> bool

Referenced types: eq, LlmRequestInterceptOutcome, bool

ne

fn ne(&self, other: &Rhs) -> bool

Referenced types: ne, &Rhs, bool

impl Serialize for LlmRequestInterceptOutcome

impl Serialize for LlmRequestInterceptOutcome

Referenced types: Serialize, LlmRequestInterceptOutcome

serialize

fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,

Referenced types: serialize, Result, Serializer, Ok, Error

impl StructuralPartialEq for LlmRequestInterceptOutcome

impl StructuralPartialEq for LlmRequestInterceptOutcome

Referenced types: StructuralPartialEq, LlmRequestInterceptOutcome