Skip to content

Support omni series model#759

Merged
DavdGao merged 11 commits intoagentscope-ai:mainfrom
qbc2016:bc/audio
Sep 20, 2025
Merged

Support omni series model#759
DavdGao merged 11 commits intoagentscope-ai:mainfrom
qbc2016:bc/audio

Conversation

@qbc2016
Copy link
Copy Markdown
Member

@qbc2016 qbc2016 commented Sep 12, 2025

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.

  • Code has been formatted with pre-commit run --all-files command
  • All tests are passing
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

Copy link
Copy Markdown
Member

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see inline comments

@DavdGao DavdGao requested a review from Copilot September 14, 2025 01:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DavdGao DavdGao requested a review from Copilot September 20, 2025 00:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DavdGao DavdGao merged commit e361db0 into agentscope-ai:main Sep 20, 2025
10 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants