Skip to content

Commit e977c11

Browse files
authored
Add workaround for shared field_names in pydantic model class (#13925)
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
1 parent 5f063a8 commit e977c11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vllm/entrypoints/openai/protocol.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,9 @@ class ChatCompletionLogProb(OpenAIBaseModel):
12381238

12391239

12401240
class ChatCompletionLogProbsContent(ChatCompletionLogProb):
1241+
# Workaround: redefine fields name cache so that it's not
1242+
# shared with the super class.
1243+
field_names: ClassVar[Optional[set[str]]] = None
12411244
top_logprobs: list[ChatCompletionLogProb] = Field(default_factory=list)
12421245

12431246

0 commit comments

Comments
 (0)