jack 2 weeks ago
parent
commit
c511eadc0b
2 changed files with 3 additions and 3 deletions
  1. 2 0
      app/core/runner/thread_runner.py
  2. 1 3
      app/services/message/message.py

+ 2 - 0
app/core/runner/thread_runner.py

@@ -411,6 +411,8 @@ class ThreadRunner:
                         )
                     elif content["type"] == "image_url":
                         message_content.append(content)
+                    elif content.get("type") == "input_audio":
+                        message_content.append(content)
                 chat_messages.append(msg_util.new_message(role, message_content))
             elif role == "assistant":
                 message_content = ""

+ 1 - 3
app/services/message/message.py

@@ -37,9 +37,7 @@ class MessageService:
                     )
                 elif msg.get("type") == "image_file" or msg.get("type") == "image_url":
                     content.append(msg)
-                elif (
-                    msg.get("type") == "input_audio" or msg.get("type") == "input_audio"
-                ):
+                elif msg.get("type") == "input_audio":
                     content.append(msg)
         return content