From 0e56df21f14ca280d255c307578b0cb05eaec4e1 Mon Sep 17 00:00:00 2001 From: girinman Date: Wed, 3 Apr 2024 16:07:38 +0900 Subject: [PATCH] feat: use seed for OpenAI requests --- router/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/router/src/lib.rs b/router/src/lib.rs index 728e13252..bf1895c7f 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -495,6 +495,7 @@ struct ChatCompletionRequest { frequency_penalty: Option, logit_bias: Option>, user: Option, + seed: Option, // Additional parameters // TODO(travis): add other LoRAX params here response_format: Option, @@ -522,6 +523,7 @@ struct CompletionRequest { best_of: Option, logit_bias: Option>, user: Option, + seed: Option, // Additional parameters // TODO(travis): add other LoRAX params here repetition_penalty: Option, @@ -653,7 +655,7 @@ impl From for CompatGenerateRequest { decoder_input_details: req.logprobs.is_some(), return_k_alternatives: None, apply_chat_template: false, - seed: None, + seed: req.seed, response_format: None, }, stream: req.stream.unwrap_or(false), @@ -687,7 +689,7 @@ impl From for CompatGenerateRequest { decoder_input_details: false, return_k_alternatives: None, apply_chat_template: true, - seed: None, + seed: req.seed, response_format: req.response_format, }, stream: req.stream.unwrap_or(false),