[router] Move all protocols to spec.rs file (#9519)

This commit is contained in:
Keyang Ru
2025-08-22 14:18:47 -07:00
committed by GitHub
parent c4500233ff
commit 5ef545e678
29 changed files with 2432 additions and 2572 deletions

View File

@@ -5,13 +5,9 @@
use serde_json::{from_str, to_string, to_value};
use sglang_router_rs::core::{BasicWorker, WorkerType};
use sglang_router_rs::protocols::{
common::StringOrArray,
generate::{GenerateParameters, GenerateRequest, SamplingParams},
openai::{
chat::{ChatCompletionRequest, ChatMessage, UserMessageContent},
completions::CompletionRequest,
},
use sglang_router_rs::protocols::spec::{
ChatCompletionRequest, ChatMessage, CompletionRequest, GenerateParameters, GenerateRequest,
SamplingParams, StringOrArray, UserMessageContent,
};
/// Create a default GenerateRequest for benchmarks with minimal fields set