mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-17 12:20:37 +08:00
fix chat engines
This commit is contained in:
@@ -107,7 +107,7 @@ class VllmEngine(BaseEngine):
|
||||
) -> AsyncIterator["RequestOutput"]:
|
||||
request_id = f"chatcmpl-{uuid.uuid4().hex}"
|
||||
if images is not None:
|
||||
if not any(IMAGE_PLACEHOLDER not in message["content"] for message in messages):
|
||||
if not any(IMAGE_PLACEHOLDER in message["content"] for message in messages):
|
||||
messages[0]["content"] = IMAGE_PLACEHOLDER * len(images) + messages[0]["content"]
|
||||
|
||||
paired_messages = messages + [{"role": "assistant", "content": ""}]
|
||||
|
||||
Reference in New Issue
Block a user