diff --git a/docs/openapi.json b/docs/openapi.json index d70023c6..92faf1ed 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -523,7 +523,7 @@ "max_new_tokens": { "type": "integer", "format": "int32", - "default": "null", + "default": "20", "example": "20", "nullable": true, "minimum": 0 diff --git a/router/src/lib.rs b/router/src/lib.rs index b547dc15..898fcd04 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -107,7 +107,7 @@ pub(crate) struct GenerateParameters { #[schema(default = "false", example = true)] pub do_sample: bool, #[serde(default = "default_max_new_tokens")] - #[schema(nullable = true, default = "null", example = "20")] + #[schema(nullable = true, default = "100", example = "20")] pub max_new_tokens: Option, #[serde(default)] #[schema(nullable = true, default = "null", example = false)] @@ -141,7 +141,7 @@ pub(crate) struct GenerateParameters { } fn default_max_new_tokens() -> Option { - None + Some(100) } fn default_parameters() -> GenerateParameters {