pub struct ProfileRegistry {
pub profiles: Vec<ModelProfile>,
}Expand description
A collection of profiles that together determine a model’s parameter schema.
Fields§
§profiles: Vec<ModelProfile>The profiles considered, in priority order.
Implementations§
Source§impl ProfileRegistry
impl ProfileRegistry
Sourcepub fn new(profiles: Vec<ModelProfile>) -> Self
pub fn new(profiles: Vec<ModelProfile>) -> Self
Build a registry from a list of profiles.
Sourcepub fn schema(&self, record: &ModelRecord) -> Vec<ParamSpec>
pub fn schema(&self, record: &ModelRecord) -> Vec<ParamSpec>
The parameter schema for record: every matching profile’s specs (first
occurrence of each key wins), plus a context_length spec when the model
and runtime honor one.
Sourcepub fn refreshed(&self, record: &ModelRecord) -> ModelRecord
pub fn refreshed(&self, record: &ModelRecord) -> ModelRecord
A copy of record with its parameter schema refreshed. An empty schema
leaves the record unchanged.
Auto Trait Implementations§
impl !RefUnwindSafe for ProfileRegistry
impl !UnwindSafe for ProfileRegistry
impl Freeze for ProfileRegistry
impl Send for ProfileRegistry
impl Sync for ProfileRegistry
impl Unpin for ProfileRegistry
impl UnsafeUnpin for ProfileRegistry
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