pub struct ModelInvocationIntent { /* private fields */ }Expand description
Immutable preparation intent for one logical model invocation.
The descriptor and request are complete execution snapshots. Credentials, SDK clients, provider aliases, process-local cancellation state, and mutable budget counters remain outside this durable value.
Implementations§
Source§impl ModelInvocationIntent
impl ModelInvocationIntent
Sourcepub fn new(
activation: NodeActivation,
invocation_id: InvocationId,
descriptor: ModelDescriptor,
request: ModelRequest,
) -> Result<Self, ModelInvocationIntentError>
pub fn new( activation: NodeActivation, invocation_id: InvocationId, descriptor: ModelDescriptor, request: ModelRequest, ) -> Result<Self, ModelInvocationIntentError>
Constructs, negotiates, and checksums a durable model invocation intent.
§Errors
Returns ModelInvocationIntentError when a retired binding is selected,
the exact descriptor does not satisfy the request, or canonical integrity
material cannot be produced.
Sourcepub fn restore(
activation: NodeActivation,
invocation_id: InvocationId,
descriptor: ModelDescriptor,
request: ModelRequest,
intent_digest: Digest,
) -> Result<Self, ModelInvocationIntentError>
pub fn restore( activation: NodeActivation, invocation_id: InvocationId, descriptor: ModelDescriptor, request: ModelRequest, intent_digest: Digest, ) -> Result<Self, ModelInvocationIntentError>
Restores an intent and verifies its negotiation and checksum layers.
§Errors
Returns ModelInvocationIntentError when validation or integrity fails.
Sourcepub const fn activation(&self) -> &NodeActivation
pub const fn activation(&self) -> &NodeActivation
Returns the owning graph-node activation.
Sourcepub const fn invocation_id(&self) -> InvocationId
pub const fn invocation_id(&self) -> InvocationId
Returns the stable logical invocation identifier.
Sourcepub const fn descriptor(&self) -> &ModelDescriptor
pub const fn descriptor(&self) -> &ModelDescriptor
Returns the exact registered model binding snapshot.
Sourcepub const fn request(&self) -> &ModelRequest
pub const fn request(&self) -> &ModelRequest
Returns the complete immutable provider-neutral request.
Sourcepub const fn intent_digest(&self) -> Digest
pub const fn intent_digest(&self) -> Digest
Returns the domain-separated preparation fingerprint.
Trait Implementations§
Source§impl Clone for ModelInvocationIntent
impl Clone for ModelInvocationIntent
Source§impl Debug for ModelInvocationIntent
impl Debug for ModelInvocationIntent
Source§impl<'de> Deserialize<'de> for ModelInvocationIntent
impl<'de> Deserialize<'de> for ModelInvocationIntent
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for ModelInvocationIntent
Source§impl JsonSchema for ModelInvocationIntent
impl JsonSchema for ModelInvocationIntent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more