pub struct ModelDescription {
pub backend: String,
pub provider: String,
pub model_name: String,
pub endpoint: Option<Url>,
}
Expand description
A parsed model id data structure.
Fields§
§backend: String
Name of the backend to invoke for generation. i.e. outsource
provider: String
Name of the provider of the model. i.e. openai-chat
model_name: String
Name of the model. i.e. gpt-3.5-turbo
endpoint: Option<Url>
Custom endpoint (if any)
Implementations§
Source§impl ModelDescription
impl ModelDescription
Sourcepub fn is_chat_model(&self) -> bool
pub fn is_chat_model(&self) -> bool
Checks if the model is a “chat” model. Currently,
it checks if the provider name ends with -chat
.
Trait Implementations§
Source§impl Display for ModelDescription
impl Display for ModelDescription
Auto Trait Implementations§
impl Freeze for ModelDescription
impl RefUnwindSafe for ModelDescription
impl Send for ModelDescription
impl Sync for ModelDescription
impl Unpin for ModelDescription
impl UnwindSafe for ModelDescription
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