strata-ctl: Rust control layer for the Strata engine (OpenAI-compatible API)
From-scratch rewrite of the Python serve (Python kept as behavioral spec). - engine: line-protocol supervisor (GEN/T/DONE/STOP/QUIT), silence watchdog, abort, is_idle probe. - config: tolerant shared-JSON loader; foreign keys ignored so one file drives strata-ctl and uostream; CLI --config/--host/--port/--serve. - inkling: o200k tokenizer wrapper + incremental UTF-8-safe detok; chat template via minijinja; channel-token dialect (reasoning streamed live); image bridge (in-process Vision, image=<path>); formatter assembling the API seam. - api: /v1/chat/completions (stream SSE + non-stream), /v1/models, /health; reasoning_content; structured tool_calls (llama.cpp --jinja style, client-side execution); stop sequences with hold-back; abort on client disconnect. 69 tests green + 2 real-file ignored; clippy clean. Text, images and tools validated live against the real Inkling engine.
This commit is contained in:
commit
597ac432e1
30 files changed
+7541
No files matched your search
@@ -0,0 +1,16 @@
|
||||
//! The OpenAI-compatible HTTP API.
|
||||
//!
|
||||
//! Layers on top of [`crate::engine`]: [`types`] is the wire contract,
|
||||
//! [`formatter`] the token<->text seam, [`service`] the completion logic, and
|
||||
//! [`routes`] the axum router.
|
||||
|
||||
pub mod formatter;
|
||||
pub mod routes;
|
||||
pub mod service;
|
||||
pub mod stop;
|
||||
pub mod types;
|
||||
|
||||
pub use formatter::{Decoder, Formatter, Piece, Prompt};
|
||||
pub use routes::router;
|
||||
pub use service::ChatService;
|
||||
pub use types::{ChatMessage, ChatRequest, ChatResponse, ModelList, Role};
|
||||
Reference in new issue
Block a user