Unverified Commit ea950355 authored by shpgy-shpgy's avatar shpgy-shpgy Committed by GitHub
Browse files

fix: the error when encountering pure text conversations (#5088)


Signed-off-by: default avatarshpgy-shpgy <875664365@qq.com>
parent 5c225145
......@@ -139,6 +139,9 @@ class MultimodalRequestProcessor:
for message in messages:
for content in message.get("content", []):
if isinstance(content, str):
text_parts.append(content)
else:
if content.get("type") == "text":
text_parts.append(content.get("text", ""))
elif content.get("type") == "image_url":
......
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