use std::path::PathBuf;
use crate::engine::NativeRuntimeConfig;
use crate::client::GatewayEndpointConfig;
#[cfg(feature = "providers")]
use crate::client::ProviderEndpointConfig;
#[derive(Debug, Clone, PartialEq)]
pub enum EndpointDescriptor {
LocalModel(LocalModelDescriptor),
Gateway(GatewayEndpointConfig),
#[cfg(feature = "providers")]
Provider(ProviderEndpointConfig),
}
impl EndpointDescriptor {
pub fn local(model_path: impl Into<PathBuf>, config: NativeRuntimeConfig) -> Self {
Self::LocalModel(LocalModelDescriptor {
model_path: model_path.into(),
config,
})
}
pub fn gateway(config: GatewayEndpointConfig) -> Self {
Self::Gateway(config)
}
#[cfg(feature = "providers")]
pub fn provider(config: ProviderEndpointConfig) -> Self {
Self::Provider(config)
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct LocalModelDescriptor {
pub model_path: PathBuf,
pub config: NativeRuntimeConfig,
}