[router] add grpc router pd mode for chat and generate (#11140)
This commit is contained in:
@@ -2,6 +2,11 @@ use serde::{Deserialize, Serialize};
|
||||
use serde_json::{to_value, Map, Number, Value};
|
||||
use std::collections::HashMap;
|
||||
|
||||
// Default model value when not specified
|
||||
fn default_model() -> String {
|
||||
"unknown".to_string()
|
||||
}
|
||||
|
||||
// # Protocol Specifications
|
||||
//
|
||||
// This module contains all protocol definitions for OpenAI and SGLang APIs.
|
||||
@@ -169,6 +174,7 @@ pub struct ChatCompletionRequest {
|
||||
pub messages: Vec<ChatMessage>,
|
||||
|
||||
/// ID of the model to use
|
||||
#[serde(default = "default_model")]
|
||||
pub model: String,
|
||||
|
||||
/// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far
|
||||
|
||||
Reference in New Issue
Block a user