Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
ea950355
Unverified
Commit
ea950355
authored
Jan 06, 2026
by
shpgy-shpgy
Committed by
GitHub
Jan 05, 2026
Browse files
fix: the error when encountering pure text conversations (#5088)
Signed-off-by:
shpgy-shpgy
<
875664365@qq.com
>
parent
5c225145
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
components/src/dynamo/trtllm/multimodal_processor.py
components/src/dynamo/trtllm/multimodal_processor.py
+14
-11
No files found.
components/src/dynamo/trtllm/multimodal_processor.py
View file @
ea950355
...
...
@@ -139,17 +139,20 @@ class MultimodalRequestProcessor:
for
message
in
messages
:
for
content
in
message
.
get
(
"content"
,
[]):
if
content
.
get
(
"type"
)
==
"text"
:
text_parts
.
append
(
content
.
get
(
"text"
,
""
))
elif
content
.
get
(
"type"
)
==
"image_url"
:
url
=
content
.
get
(
"image_url"
,
{}).
get
(
"url"
,
""
)
if
not
url
:
continue
self
.
modality
=
"image"
if
url
.
endswith
((
".pt"
,
".pth"
,
".bin"
)):
embedding_paths
.
append
(
url
)
else
:
image_urls
.
append
(
url
)
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"
:
url
=
content
.
get
(
"image_url"
,
{}).
get
(
"url"
,
""
)
if
not
url
:
continue
self
.
modality
=
"image"
if
url
.
endswith
((
".pt"
,
".pth"
,
".bin"
)):
embedding_paths
.
append
(
url
)
else
:
image_urls
.
append
(
url
)
return
" "
.
join
(
text_parts
),
image_urls
,
embedding_paths
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment