pub struct ModelEndpoint {
pub id: ModelId,
pub display_name: String,
pub description: String,
pub base_model: String,
pub adapter: Option<String>,
pub max_context_length: usize,
pub is_default: bool,
pub status: EndpointStatus,
}Expand description
Metadata for a served model variant.
Each endpoint represents a unique model configuration that can receive inference requests. A base model may have multiple endpoints, each with a different LoRA adapter applied.
Fields§
§id: ModelIdUnique identifier for this endpoint.
display_name: StringHuman-readable display name.
description: StringLonger description of what this endpoint provides.
base_model: StringName of the underlying base model.
adapter: Option<String>Optional LoRA adapter name applied on top of the base model.
max_context_length: usizeMaximum context length (in tokens) this endpoint supports.
is_default: boolWhether this endpoint is the default when no model is specified.
status: EndpointStatusCurrent operational status.
Implementations§
Source§impl ModelEndpoint
impl ModelEndpoint
Sourcepub fn new(id: impl Into<String>, base_model: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, base_model: impl Into<String>) -> Self
Create a new endpoint with sensible defaults.
Status is set to Ready, no adapter, default context length of 4096.
Sourcepub fn with_adapter(self, adapter: impl Into<String>) -> Self
pub fn with_adapter(self, adapter: impl Into<String>) -> Self
Attach a LoRA adapter to this endpoint.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set a human-readable description.
Sourcepub fn with_context_length(self, ctx: usize) -> Self
pub fn with_context_length(self, ctx: usize) -> Self
Set the maximum context length.
Sourcepub fn set_default(self) -> Self
pub fn set_default(self) -> Self
Mark this endpoint as the default.
Trait Implementations§
Source§impl Clone for ModelEndpoint
impl Clone for ModelEndpoint
Source§fn clone(&self) -> ModelEndpoint
fn clone(&self) -> ModelEndpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ModelEndpoint
impl RefUnwindSafe for ModelEndpoint
impl Send for ModelEndpoint
impl Sync for ModelEndpoint
impl Unpin for ModelEndpoint
impl UnsafeUnpin for ModelEndpoint
impl UnwindSafe for ModelEndpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more