feat: update media parsers#196
Merged
MaojiaSheng merged 19 commits intovolcengine:mainfrom Feb 20, 2026
Merged
Conversation
…y - add top-level wait/status/health commands
|
openviking seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
- Add parse/parsers/media/utils.py with media helpers - Refactor ImageParser.parse(), AudioParser.parse(), VideoParser.parse() to remove content understanding, keep only metadata extraction - Update SemanticProcessor._generate_single_file_summary() to handle media types and call media utils for summary generation - Update TreeBuilder._get_base_uri() to use media utils - Update ResourceNode.get_abstract() and get_overview() to check meta for abstract/overview - Add debug logs and error handling
…ummary - Add _generate_text_summary function for text file processing - Update media utils functions to accept llm_sem and use it to limit concurrent calls - Update _generate_single_file_summary to call _generate_text_summary and media utils functions - Fix import ordering - Fix issue where _generate_file_summaries was creating a new semaphore, now each _generate_single_file_summary handles its own
ZaynJarvis
reviewed
Feb 20, 2026
| await viking_fs.mkdir(root_dir_uri) | ||
|
|
||
| # 1.1 Save original video with original filename (sanitized) | ||
| await viking_fs.write_file_bytes(f"{root_dir_uri}/{original_filename}", video_bytes) |
Collaborator
There was a problem hiding this comment.
openviking/parse/parsers/media/video.py:97
- 改成 chunked read-write with buffer 是否对内存更好
- 在 write bytes 之前检查头文件是否更好,isValid 检查只需要 head x bytes
Collaborator
Author
There was a problem hiding this comment.
这里没细琢磨,不过不应假设只操作本地文件系统
ZaynJarvis
reviewed
Feb 20, 2026
| prompt = render_prompt( | ||
| "parsing.image_summary", | ||
| { | ||
| "context": "No additional context", |
ZaynJarvis
reviewed
Feb 20, 2026
| f"size = image_resource.get_size() # ({node.meta['width']}, {node.meta['height']})\n" | ||
| ) | ||
| overview_parts.append(f'format = image_resource.get_format() # "{node.meta["format"]}"\n') | ||
| overview_parts.append("```\n") |
Collaborator
There was a problem hiding this comment.
这一段和 overview parts 已有信息重复了,也许不需要指导执行,另外这部分 guide 应该不需要每个 image 都有一份
ZaynJarvis
approved these changes
Feb 20, 2026
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.
Description
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes