pub struct OpenAiModel { /* private fields */ }Expand description
Represents a single entry in the model catalog, mapped to the OpenAI
model object shape (id plus owned_by).
Implementations§
Source§impl OpenAiModel
impl OpenAiModel
Sourcepub fn new(id: impl Into<String>, owned_by: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, owned_by: impl Into<String>) -> Self
Builds a model entry from an id and the owning provider name.
Sourcepub fn fixture_echo() -> Self
pub fn fixture_echo() -> Self
Returns the built-in fixture/echo model owned by sim.
Sourcepub fn sim_native(id: impl Into<String>) -> Self
pub fn sim_native(id: impl Into<String>) -> Self
Returns a SIM-native model with the given id owned by sim.
Sourcepub fn from_model_card(card: ModelCard) -> Self
pub fn from_model_card(card: ModelCard) -> Self
Builds a model entry from a runner ModelCard, taking the card’s
model id and provider.
Trait Implementations§
Source§impl Clone for OpenAiModel
impl Clone for OpenAiModel
Source§fn clone(&self) -> OpenAiModel
fn clone(&self) -> OpenAiModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenAiModel
impl Debug for OpenAiModel
impl Eq for OpenAiModel
Source§impl PartialEq for OpenAiModel
impl PartialEq for OpenAiModel
Source§fn eq(&self, other: &OpenAiModel) -> bool
fn eq(&self, other: &OpenAiModel) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OpenAiModel
Auto Trait Implementations§
impl Freeze for OpenAiModel
impl RefUnwindSafe for OpenAiModel
impl Send for OpenAiModel
impl Sync for OpenAiModel
impl Unpin for OpenAiModel
impl UnsafeUnpin for OpenAiModel
impl UnwindSafe for OpenAiModel
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