A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 17:15 UTC
Add workaround for shared field_names in pydantic model class (#13925)
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Maximilien de Bayser committed
Mar 25, 2025 at 17:31 UTC
e977c111112220a163ded260554684d7dd1882a1
1 file changed
+3
vllm/entrypoints/openai/protocol.py
+3
@@ -1238,6 +1238,9 @@ class ChatCompletionLogProb(OpenAIBaseModel):
1238
1239
1240
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
1244
top_logprobs: list[ChatCompletionLogProb] = Field(default_factory=list)
1245
1246