From 2ea267f624cc7971b462511f5537ea0742582f19 Mon Sep 17 00:00:00 2001 From: Yuanle Liu Date: Thu, 10 Jul 2025 11:14:52 +0800 Subject: [PATCH] assert prompt len > 0 (#2773) --- fastdeploy/worker/gpu_model_runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastdeploy/worker/gpu_model_runner.py b/fastdeploy/worker/gpu_model_runner.py index e62fb6e56..a96db10ad 100644 --- a/fastdeploy/worker/gpu_model_runner.py +++ b/fastdeploy/worker/gpu_model_runner.py @@ -166,6 +166,7 @@ class GPUModelRunner(ModelRunnerBase): request = req_dicts[i] idx = request.idx length = len(request.prompt_token_ids) + assert length > 0, "The prompt requested must not be empty." prefill_tokens = [] if (request.guided_json is not None