pub struct OpenAICompatibleModel(/* private fields */);Expand description
A model identifier served by an OpenAI-compatible endpoint.
The other catalogs in this module enumerate a vendor’s published models and
keep a Custom(String) escape hatch. An OpenAI-compatible endpoint has no
published catalog — the identifiers are whatever the operator loaded, like
llama3.1:8b, qwen2.5-coder:14b, or /models/Mistral-7B-Instruct — so
this type is the escape hatch and nothing else.
§Examples
use rai_sdk::OpenAICompatibleModel;
let model = OpenAICompatibleModel::new("llama3.1:8b");
assert_eq!(model.as_str(), "llama3.1:8b");
assert_eq!(model, "llama3.1:8b".parse().unwrap());Implementations§
Trait Implementations§
Source§impl Clone for OpenAICompatibleModel
impl Clone for OpenAICompatibleModel
Source§fn clone(&self) -> OpenAICompatibleModel
fn clone(&self) -> OpenAICompatibleModel
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 OpenAICompatibleModel
impl Debug for OpenAICompatibleModel
Source§impl<'de> Deserialize<'de> for OpenAICompatibleModel
impl<'de> Deserialize<'de> for OpenAICompatibleModel
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OpenAICompatibleModel
impl Display for OpenAICompatibleModel
impl Eq for OpenAICompatibleModel
Source§impl From<&str> for OpenAICompatibleModel
impl From<&str> for OpenAICompatibleModel
Source§impl From<String> for OpenAICompatibleModel
impl From<String> for OpenAICompatibleModel
Source§impl FromStr for OpenAICompatibleModel
impl FromStr for OpenAICompatibleModel
Source§impl Hash for OpenAICompatibleModel
impl Hash for OpenAICompatibleModel
Source§impl PartialEq for OpenAICompatibleModel
impl PartialEq for OpenAICompatibleModel
Source§impl Serialize for OpenAICompatibleModel
impl Serialize for OpenAICompatibleModel
impl StructuralPartialEq for OpenAICompatibleModel
Auto Trait Implementations§
impl Freeze for OpenAICompatibleModel
impl RefUnwindSafe for OpenAICompatibleModel
impl Send for OpenAICompatibleModel
impl Sync for OpenAICompatibleModel
impl Unpin for OpenAICompatibleModel
impl UnsafeUnpin for OpenAICompatibleModel
impl UnwindSafe for OpenAICompatibleModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.