[Frontend] Allow return_tokens_as_token_ids to be passed as a request param (#14066)
Signed-off-by: Benjamin Chislett <benjamin.chislett@centml.ai>
This commit is contained in:
committed by
GitHub
parent
dae9ec464c
commit
32985bed7c
@@ -369,6 +369,12 @@ class ChatCompletionRequest(OpenAIBaseModel):
|
||||
"arguments. For example: {'qualname': "
|
||||
"'my_module.MyLogitsProcessor', 'args': [1, 2], 'kwargs': "
|
||||
"{'param': 'value'}}."))
|
||||
return_tokens_as_token_ids: Optional[bool] = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"If specified with 'logprobs', tokens are represented "
|
||||
" as strings of the form 'token_id:{token_id}' so that tokens "
|
||||
"that are not JSON-encodable can be identified."))
|
||||
|
||||
# doc: end-chat-completion-extra-params
|
||||
|
||||
@@ -739,6 +745,12 @@ class CompletionRequest(OpenAIBaseModel):
|
||||
"arguments. For example: {'qualname': "
|
||||
"'my_module.MyLogitsProcessor', 'args': [1, 2], 'kwargs': "
|
||||
"{'param': 'value'}}."))
|
||||
return_tokens_as_token_ids: Optional[bool] = Field(
|
||||
default=None,
|
||||
description=(
|
||||
"If specified with 'logprobs', tokens are represented "
|
||||
" as strings of the form 'token_id:{token_id}' so that tokens "
|
||||
"that are not JSON-encodable can be identified."))
|
||||
|
||||
# doc: end-completion-extra-params
|
||||
|
||||
|
||||
Reference in New Issue
Block a user