pub struct Embedding {
pub http: HttpSurface,
pub model_naming: ModelNaming,
pub model_name: fn(&Path, &HashSet<String>) -> String,
pub sampling_fallback: Option<SamplingFallback>,
pub identity: ServerIdentity,
pub session_socket: bool,
pub workerd: Option<PathBuf>,
}Expand description
What a program running run in place of superfluid serve changes.
Embedding::default is superfluid serve itself.
Fields§
§http: HttpSurfaceThe APIs served beside the OpenAI-compatible routes.
model_naming: ModelNamingHow a request’s model picks the model that serves it.
model_name: fn(&Path, &HashSet<String>) -> StringNames registered artifacts (initial, additional and model-dir models). Receives already registered names so an embedding can disambiguate variants. Explicit HTTP model IDs are not rewritten.
sampling_fallback: Option<SamplingFallback>Sampling policy for omitted parameters; None is superfluid’s default.
identity: ServerIdentityThe name and version the HTTP API reports for the server.
session_socket: boolWhether the native session API listens on a unix socket (--socket).
Without it the HTTP API is all there is, and --no-http is refused.
workerd: Option<PathBuf>The program that runs a linked runtime’s worker, in place of the superfluid-workerd
beside this executable; it passes crate::workerd::main’s arguments to it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Embedding
impl RefUnwindSafe for Embedding
impl Send for Embedding
impl Sync for Embedding
impl Unpin for Embedding
impl UnsafeUnpin for Embedding
impl UnwindSafe for Embedding
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
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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