Unverified Commit f3d8a346 authored by wang.yuqi's avatar wang.yuqi Committed by GitHub
Browse files

[Bugfix] Do not add extra \n for image-only cases when constructing multimodal...


[Bugfix] Do not add extra \n for image-only cases when constructing multimodal text prompts. (#33647)
Signed-off-by: default avatarwang.yuqi <yuqi.wang@daocloud.io>
parent 4bc913ae
......@@ -1164,7 +1164,10 @@ def _get_full_multimodal_text_prompt(
# NOTE: Default behaviour: we always add missing placeholders
# at the front of the prompt, if interleave_strings=False
if text_prompt:
return "\n".join(missing_placeholders + [text_prompt])
else:
return "\n".join(missing_placeholders)
# No need to validate using Pydantic again
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment