feature (fileblock): Support FileBlock in AgentScope and Bump to v1.1.0b3#436
Conversation
Summary of ChangesHello @rayrayraykk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the AgentScope runtime by adding robust support for file content within its messaging system. It establishes a standardized Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for FileBlock in AgentScope. The changes are generally in the right direction, but I've identified a critical issue in src/agentscope_runtime/adapters/agentscope/message.py where a TypedDict is being instantiated incorrectly, which will lead to a runtime error. I've also provided suggestions to improve code robustness, readability, and maintainability by refactoring data URI parsing and simplifying verbose logic.
There was a problem hiding this comment.
Pull request overview
This PR adds support for FileBlock in AgentScope, enabling file content handling in both message conversion and streaming scenarios.
Changes:
- Version bumped from v1.1.0b2 to v1.1.0b3 across version.py and pyproject.toml
- Introduced FileBlock TypedDict to define file block structure with URL/base64 source support
- Extended message-to-Msg conversion to handle file content types with filename metadata
- Added file content streaming support with both URL and base64 data handling
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/agentscope_runtime/version.py | Version bump to v1.1.0b3 |
| pyproject.toml | Version bump to v1.1.0b3 to maintain consistency |
| src/agentscope_runtime/adapters/agentscope/message.py | Adds FileBlock TypedDict definition and integrates file content handling in message conversion logic with support for both URL and base64 sources |
| src/agentscope_runtime/adapters/agentscope/stream.py | Imports FileContent and adds streaming support for file blocks with URL and base64 data handling |
No description provided.