pub struct RequestedExecutionProfile { /* private fields */ }Expand description
What a role’s work asks of whatever executes it.
Requested, and only requested. The host decides what actually runs and the claim already records it; a field here named for what ran would be a promise the design cannot keep.
Implementations§
Source§impl RequestedExecutionProfile
impl RequestedExecutionProfile
Sourcepub fn new(
requested_model: ModelName,
requested_reasoning_effort: ReasoningEffort,
required_capabilities: impl IntoIterator<Item = Capability>,
fallback_policy: ExecutionProfileFallbackPolicy,
fallback_model: Option<ModelName>,
) -> Result<Self, DomainError>
pub fn new( requested_model: ModelName, requested_reasoning_effort: ReasoningEffort, required_capabilities: impl IntoIterator<Item = Capability>, fallback_policy: ExecutionProfileFallbackPolicy, fallback_model: Option<ModelName>, ) -> Result<Self, DomainError>
Construct a request whose fallback declaration is coherent.
Declaring a fallback model under a reject policy states two
incompatible things about the same situation, and a run would
have to pick one of them in silence.
pub const fn requested_model(&self) -> &ModelName
pub const fn requested_reasoning_effort(&self) -> &ReasoningEffort
pub const fn required_capabilities(&self) -> &BTreeSet<Capability>
pub const fn fallback_policy(&self) -> ExecutionProfileFallbackPolicy
pub const fn fallback_model(&self) -> Option<&ModelName>
Trait Implementations§
Source§impl Clone for RequestedExecutionProfile
impl Clone for RequestedExecutionProfile
Source§impl Debug for RequestedExecutionProfile
impl Debug for RequestedExecutionProfile
Source§impl<'de> Deserialize<'de> for RequestedExecutionProfile
Decoding goes through the constructor, so a document that both
refuses fallback and declares one is refused where it arrives
rather than leaving a run to pick one of the two in silence.
impl<'de> Deserialize<'de> for RequestedExecutionProfile
Decoding goes through the constructor, so a document that both refuses fallback and declares one is refused where it arrives rather than leaving a run to pick one of the two in silence.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RequestedExecutionProfile
impl StructuralPartialEq for RequestedExecutionProfile
Auto Trait Implementations§
impl Freeze for RequestedExecutionProfile
impl RefUnwindSafe for RequestedExecutionProfile
impl Send for RequestedExecutionProfile
impl Sync for RequestedExecutionProfile
impl Unpin for RequestedExecutionProfile
impl UnsafeUnpin for RequestedExecutionProfile
impl UnwindSafe for RequestedExecutionProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more