diff --git a/router/src/lib.rs b/router/src/lib.rs index d99c17951..9d5dda3e0 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -455,6 +455,8 @@ struct ChatCompletionRequest { // Additional parameters // TODO(travis): add other LoRAX params here response_format: Option, + repetition_penalty: Option, + top_k: Option, } #[derive(Clone, Debug, Deserialize, ToSchema)] @@ -478,6 +480,8 @@ struct CompletionRequest { user: Option, // Additional parameters // TODO(travis): add other LoRAX params here + repetition_penalty: Option, + top_k: Option, } #[derive(Serialize, ToSchema)] @@ -587,8 +591,8 @@ impl From for CompatGenerateRequest { api_token: None, best_of: req.best_of.map(|x| x as usize), temperature: req.temperature, - repetition_penalty: None, - top_k: None, + repetition_penalty: req.repetition_penalty, + top_k: req.top_k, top_p: req.top_p, typical_p: None, do_sample: !req.n.is_none(), @@ -622,8 +626,8 @@ impl From for CompatGenerateRequest { api_token: None, best_of: req.n.map(|x| x as usize), temperature: req.temperature, - repetition_penalty: None, - top_k: None, + repetition_penalty: req.repetition_penalty, + top_k: req.top_k, top_p: req.top_p, typical_p: None, do_sample: !req.n.is_none(),