Unverified Commit 375e5984 authored by Shiyan Deng's avatar Shiyan Deng Committed by GitHub
Browse files

Support configure skip_special_tokens in openai response api (#32345)


Signed-off-by: default avatarShiyan Deng <dsy842974287@meta.com>
parent 19b251fe
......@@ -171,6 +171,7 @@ class ResponsesRequest(OpenAIBaseModel):
top_k: int | None = None
truncation: Literal["auto", "disabled"] | None = "disabled"
user: str | None = None
skip_special_tokens: bool = True
# --8<-- [start:responses-extra-params]
request_id: str = Field(
......@@ -279,6 +280,7 @@ class ResponsesRequest(OpenAIBaseModel):
structured_outputs=structured_outputs,
logit_bias=self.logit_bias,
skip_clone=True, # Created fresh per request, safe to skip clone
skip_special_tokens=self.skip_special_tokens,
)
def is_include_output_logprobs(self) -> bool:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment