[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

@@ -3,13 +3,9 @@ use serde_json::{from_str, to_string, to_value, to_vec};
use std::time::Instant;
use sglang_router_rs::core::{BasicWorker, Worker, 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,
};
use sglang_router_rs::routers::pd_types::{generate_room_id, get_hostname, RequestWithBootstrap};