mirror of
https://github.com/wassname/vllm.git
synced 2026-09-10 12:41:29 +08:00
[BugFix] Fix server crash on empty prompt (#7746)
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import pytest
|
||||
|
||||
from vllm import LLM
|
||||
|
||||
|
||||
def test_empty_prompt():
|
||||
llm = LLM(model="gpt2")
|
||||
with pytest.raises(ValueError, match='Prompt cannot be empty'):
|
||||
llm.generate([""])
|
||||
Reference in New Issue
Block a user