Add manual routing policy for router (#15586)
This commit is contained in:
@@ -145,6 +145,10 @@ pub struct CompletionRequest {
|
||||
/// Additional fields including bootstrap info for PD routing
|
||||
#[serde(flatten)]
|
||||
pub other: Map<String, Value>,
|
||||
|
||||
/// Routing ID for manual routing policy
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub routing_id: Option<String>,
|
||||
}
|
||||
|
||||
impl GenerationRequest for CompletionRequest {
|
||||
@@ -162,6 +166,10 @@ impl GenerationRequest for CompletionRequest {
|
||||
StringOrArray::Array(v) => v.join(" "),
|
||||
}
|
||||
}
|
||||
|
||||
fn get_routing_id(&self) -> Option<&str> {
|
||||
self.routing_id.as_deref()
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user