Skip to content

Commit 68c046a

Browse files
committed
merge with main branch
1 parent 577d498 commit 68c046a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vllm/entrypoints/openai/protocol.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ class EmbeddingCompletionRequest(OpenAIBaseModel):
15031503
encoding_format: Literal["float", "base64"] = "float"
15041504
dimensions: int | None = None
15051505
user: str | None = None
1506-
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = None
1506+
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = -1
15071507

15081508
# --8<-- [start:embedding-extra-params]
15091509
add_special_tokens: bool = Field(
@@ -1557,7 +1557,7 @@ class EmbeddingChatRequest(OpenAIBaseModel):
15571557
encoding_format: Literal["float", "base64"] = "float"
15581558
dimensions: int | None = None
15591559
user: str | None = None
1560-
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = None
1560+
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = -1
15611561

15621562
# --8<-- [start:chat-embedding-extra-params]
15631563
add_generation_prompt: bool = Field(
@@ -1705,7 +1705,7 @@ class ScoreRequest(OpenAIBaseModel):
17051705
model: str | None = None
17061706
text_1: list[str] | str | ScoreMultiModalParam
17071707
text_2: list[str] | str | ScoreMultiModalParam
1708-
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = None
1708+
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = -1
17091709

17101710
# --8<-- [start:score-extra-params]
17111711

@@ -1739,7 +1739,7 @@ class RerankRequest(OpenAIBaseModel):
17391739
query: str | ScoreMultiModalParam
17401740
documents: list[str] | ScoreMultiModalParam
17411741
top_n: int = Field(default_factory=lambda: 0)
1742-
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = None
1742+
truncate_prompt_tokens: Annotated[int, Field(ge=-1)] | None = -1
17431743

17441744
# --8<-- [start:rerank-extra-params]
17451745

0 commit comments

Comments
 (0)