pub struct EngineConfig {
pub kind: EngineKind,
pub url: String,
pub kv_offload: KvOffload,
pub vllm: VllmEngineConfig,
pub sglang: SglangEngineConfig,
pub llama_cpp: LlamaCppEngineConfig,
}Expand description
Inference engine driver.
Cognitora’s cgn-agent proxies to an OpenAI-compatible HTTP server. This
block describes which engine to spawn and how. Four kinds are supported:
vllm— the agent spawnsvllm serve <model> ...(GPU).sglang— the agent spawnspython -m sglang.launch_server ...(GPU). SGLang offers RadixAttention prefix caching and structured-output acceleration; from the router’s perspective it speaks the same OpenAI surface as vLLM and is fully interchangeable.llama_cpp— the agent spawnspython -m llama_cpp.serveror a standalonellama-serverbinary (CPU or GPU offload).openai_compat— the agent does not spawn anything; it just proxies toengine.url. Use this when the engine is managed by systemd / Kubernetes / a sidecar.
Fields§
§kind: EngineKind§url: StringHTTP base URL where the engine exposes the OpenAI surface.
kv_offload: KvOffloadEngine-side KV offload / cross-worker connector. Picks the
--kv-transfer-config JSON for vLLM and the
--enable-hierarchical-cache flag set for SGLang. See KvOffload.
vllm: VllmEngineConfigvLLM-specific knobs (used when kind = "vllm").
sglang: SglangEngineConfigSGLang-specific knobs (used when kind = "sglang").
llama_cpp: LlamaCppEngineConfigllama.cpp-specific knobs (used when kind = "llama_cpp").
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineConfig
impl Debug for EngineConfig
Source§impl Default for EngineConfig
impl Default for EngineConfig
Source§impl<'de> Deserialize<'de> for EngineConfigwhere
EngineConfig: Default,
impl<'de> Deserialize<'de> for EngineConfigwhere
EngineConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
impl UnwindSafe for EngineConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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