Skip to content

Commit 6ab0293

Browse files
authored
Set alias for max_completion_tokens in ChatRequest (#2932)
1 parent cc21215 commit 6ab0293

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

router/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ pub struct CompletionRequest {
460460
pub prompt: Prompt,
461461

462462
/// The maximum number of tokens that can be generated in the chat completion.
463-
#[serde(default, alias = "max_completion_tokens")]
463+
#[serde(default)]
464464
#[schema(default = "1024", example = "32")]
465465
pub max_tokens: Option<u32>,
466466

@@ -840,7 +840,7 @@ pub(crate) struct ChatRequest {
840840
pub top_logprobs: Option<u32>,
841841

842842
/// The maximum number of tokens that can be generated in the chat completion.
843-
#[serde(default)]
843+
#[serde(default, alias = "max_completion_tokens")]
844844
#[schema(default = "1024", example = "32")]
845845
pub max_tokens: Option<u32>,
846846

0 commit comments

Comments
 (0)