Skip to content

Commit 8fed8b4

Browse files
committed
add check for messages
1 parent d93b212 commit 8fed8b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastdeploy/entrypoints/openai/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def to_dict_for_infer(self, request_id=None):
671671
if request_id is not None:
672672
req_dict["request_id"] = request_id
673673

674-
if "prompt_token_ids" not in req_dict:
674+
if "prompt_token_ids" not in req_dict or not req_dict["prompt_token_ids"]:
675675
# If disable_chat_template is set, then the first message in messages will be used as the prompt.
676676
assert (
677677
len(req_dict["messages"]) > 0

0 commit comments

Comments
 (0)