Signed-off-by: Bugen Zhao <i@bugenzhao.com> Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: Eric Curtin <eric.curtin@docker.com> Signed-off-by: Dev-X25874 <283057883+Dev-X25874@users.noreply.github.com> Signed-off-by: Will.hou <1205157517@qq.com> Signed-off-by: Will.hou <willamhou@ceresman.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Eric Curtin <eric.curtin@docker.com> Co-authored-by: Dev-X25874 <283057883+Dev-X25874@users.noreply.github.com> Co-authored-by: Will.hou <1205157517@qq.com> Co-authored-by: Will.hou <willamhou@ceresman.com> Please see https://github.com/Inferact/vllm-frontend-rs for full original commit history.
32 lines
674 B
Rust
32 lines
674 B
Rust
mod encoding;
|
|
|
|
use vllm_text::Prompt;
|
|
|
|
use super::{ChatRenderer, RenderedPrompt};
|
|
use crate::Result;
|
|
use crate::request::ChatRequest;
|
|
|
|
/// Dedicated DeepSeek V3.2 renderer.
|
|
#[derive(Debug, Clone, Copy, Default)]
|
|
pub struct DeepSeekV32ChatRenderer;
|
|
|
|
impl DeepSeekV32ChatRenderer {
|
|
/// Create the dedicated DeepSeek V3.2 renderer.
|
|
pub fn new() -> Self {
|
|
Self
|
|
}
|
|
}
|
|
|
|
impl ChatRenderer for DeepSeekV32ChatRenderer {
|
|
fn render(&self, request: &ChatRequest) -> Result<RenderedPrompt> {
|
|
request.validate()?;
|
|
|
|
Ok(RenderedPrompt {
|
|
prompt: Prompt::Text(encoding::render_request(request)?),
|
|
})
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|