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
2b157d89
Unverified
Commit
2b157d89
authored
Jan 05, 2026
by
Tanmay Verma
Committed by
GitHub
Jan 05, 2026
Browse files
fix: Allow requests to include audio contents before text (#5143)
parent
6be9c9a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
examples/multimodal/components/processor.py
examples/multimodal/components/processor.py
+9
-5
No files found.
examples/multimodal/components/processor.py
View file @
2b157d89
...
@@ -204,11 +204,15 @@ class Processor(ProcessMixIn):
...
@@ -204,11 +204,15 @@ class Processor(ProcessMixIn):
if
"<prompt>"
not
in
template
:
if
"<prompt>"
not
in
template
:
raise
ValueError
(
"prompt_template must contain '<prompt>' placeholder"
)
raise
ValueError
(
"prompt_template must contain '<prompt>' placeholder"
)
# Safely extract user text
# Safely extract user text - find the text content item
try
:
user_text
=
None
user_text
=
raw_request
.
messages
[
0
].
content
[
0
].
text
for
message
in
raw_request
.
messages
:
except
(
IndexError
,
AttributeError
)
as
e
:
for
item
in
message
.
content
:
raise
ValueError
(
f
"Invalid message structure:
{
e
}
"
)
if
item
.
type
==
"text"
:
user_text
=
item
.
text
break
if
user_text
is
None
:
raise
ValueError
(
"No text content found in the request messages"
)
prompt
=
template
.
replace
(
"<prompt>"
,
user_text
)
prompt
=
template
.
replace
(
"<prompt>"
,
user_text
)
...
...
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