[Frontend] OpenAI API server: Add add_special_tokens to ChatCompletionRequest (default False) (#5278)

This commit is contained in:
tomeras91
2024-06-05 09:32:58 -07:00
committed by GitHub
parent c65146e75e
commit f0a500545f
3 changed files with 20 additions and 7 deletions
+9
View File
@@ -176,6 +176,15 @@ class ChatCompletionRequest(OpenAIBaseModel):
"This is a parameter used by chat template in tokenizer config of the "
"model."),
)
add_special_tokens: Optional[bool] = Field(
default=False,
description=(
"If true, special tokens (e.g. BOS) will be added to the prompt "
"on top of what is added by the chat template. "
"For most models, the chat template takes care of adding the "
"special tokens so this should be set to False (as is the "
"default)."),
)
include_stop_str_in_output: Optional[bool] = Field(
default=False,
description=(