pub struct PipelineDescriptor {
pub name: String,
pub target_class: PromptClass,
pub also_serves: Vec<PromptClass>,
pub worker: Arc<dyn ModelWorker>,
pub config: Option<PipelineConfig>,
}Expand description
Descriptor for a single named pipeline instance.
Fields§
§name: StringUnique name (e.g. “fast”, “reasoning”, “code”).
target_class: PromptClassPrimary prompt class this pipeline serves.
also_serves: Vec<PromptClass>Additional classes this pipeline can serve (fallback order).
worker: Arc<dyn ModelWorker>The worker for this pipeline.
config: Option<PipelineConfig>Pipeline config override (uses default if None).
Implementations§
Source§impl PipelineDescriptor
impl PipelineDescriptor
Sourcepub fn new(
name: impl Into<String>,
target_class: PromptClass,
worker: Arc<dyn ModelWorker>,
) -> Self
pub fn new( name: impl Into<String>, target_class: PromptClass, worker: Arc<dyn ModelWorker>, ) -> Self
Create a basic descriptor serving one prompt class.
Sourcepub fn also_serving(self, classes: Vec<PromptClass>) -> Self
pub fn also_serving(self, classes: Vec<PromptClass>) -> Self
Add additional prompt classes this pipeline can handle.
Sourcepub fn with_config(self, config: PipelineConfig) -> Self
pub fn with_config(self, config: PipelineConfig) -> Self
Override the default pipeline config.
Auto Trait Implementations§
impl !RefUnwindSafe for PipelineDescriptor
impl !UnwindSafe for PipelineDescriptor
impl Freeze for PipelineDescriptor
impl Send for PipelineDescriptor
impl Sync for PipelineDescriptor
impl Unpin for PipelineDescriptor
impl UnsafeUnpin for PipelineDescriptor
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request