pub struct LlmRequestInterceptOutcome {
pub request: LlmRequest,
pub annotated_request: Option<AnnotatedLlmRequest>,
pub pending_marks: Vec<PendingMarkSpec>,
pub optimization_contributions: Vec<LlmOptimizationContribution>,
}Expand description
Result of an LLM request intercept that can schedule lifecycle marks.
Fields§
§request: LlmRequestRewritten 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§
Source§impl LlmRequestInterceptOutcome
impl LlmRequestInterceptOutcome
Sourcepub fn new(
request: LlmRequest,
annotated_request: Option<AnnotatedLlmRequest>,
) -> LlmRequestInterceptOutcome
pub fn new( request: LlmRequest, annotated_request: Option<AnnotatedLlmRequest>, ) -> LlmRequestInterceptOutcome
Create an outcome without pending marks.
Sourcepub fn with_pending_mark(
self,
mark: PendingMarkSpec,
) -> LlmRequestInterceptOutcome
pub fn with_pending_mark( self, mark: PendingMarkSpec, ) -> LlmRequestInterceptOutcome
Append one pending mark while preserving interceptor order.
Sourcepub fn with_optimization_contribution(
self,
contribution: LlmOptimizationContribution,
) -> LlmRequestInterceptOutcome
pub fn with_optimization_contribution( self, contribution: LlmOptimizationContribution, ) -> LlmRequestInterceptOutcome
Append one optimization contribution while preserving interceptor order.
Trait Implementations§
Source§impl Clone for LlmRequestInterceptOutcome
impl Clone for LlmRequestInterceptOutcome
Source§fn clone(&self) -> LlmRequestInterceptOutcome
fn clone(&self) -> LlmRequestInterceptOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more