Support omni series model#759
Merged
DavdGao merged 11 commits intoagentscope-ai:mainfrom Sep 20, 2025
Merged
Conversation
DavdGao
reviewed
Sep 14, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for omni series models by implementing audio response functionality in AgentScope. The changes enable the framework to handle audio output from models like Qwen-Omni, allowing agents to generate and play audio responses alongside text.
- Adds audio block support to OpenAI chat model parsing and response generation
- Implements real-time audio playback in agent base class using PyAudio
- Creates example demonstrating audio-enabled conversational agent with Qwen-Omni model
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/agentscope/model/_openai_model.py |
Adds AudioBlock import and parsing logic for audio responses in both streaming and non-streaming modes |
src/agentscope/model/_model_response.py |
Updates ChatResponse to include AudioBlock in supported content types |
src/agentscope/agent/_agent_base.py |
Implements audio playback functionality with PyAudio integration and stream handling |
tests/model_openai_test.py |
Adds audio field to mock responses for testing compatibility |
examples/functionality/audio_response/main.py |
Demonstrates usage with Qwen-Omni model configuration |
examples/functionality/audio_response/README.md |
Provides documentation for the audio response example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# Conflicts: # src/agentscope/model/_model_response.py
rayrayraykk
pushed a commit
to rayrayraykk/AgentScope
that referenced
this pull request
Dec 22, 2025
…tscope-ai#759) --------- Co-authored-by: DavdGao <gaodawei.gdw@alibaba-inc.com>
Kanaricc
pushed a commit
to Kanaricc/agentscope
that referenced
this pull request
Feb 24, 2026
…tscope-ai#759) --------- Co-authored-by: DavdGao <gaodawei.gdw@alibaba-inc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope Version
[The version of AgentScope you are working on, e.g.
import agentscope; print(agentscope.__version__)]Description
[Please describe the background, purpose, changes made, and how to test this PR]
Checklist
Please check the following items before code is ready to be reviewed.
pre-commit run --all-filescommand