mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 18:35:48 +08:00
实现附件处理链路的统一引用化与可检索增强,避免大文件/多模态内容直接撑爆上下文并提升工具可用性。
本次补齐 text/image/video/archive 的标准化处理、会话级工具守卫、回放压缩、配置与文档对齐,并修复表格与流式输出相关体验问题。 Made-with: Cursor
This commit is contained in:
parent
9d2900db02
commit
37a2ef35f4
27 changed files with 3227 additions and 278 deletions
19
tests/test_video_query_tool.py
Normal file
19
tests/test_video_query_tool.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import oclaw.runtime.tools.experts.generalist.video_query as vq
|
||||
|
||||
|
||||
def test_normalized_video_meta_extracts_top_level_fields() -> None:
|
||||
obj = {
|
||||
"format": {"duration": "12.50"},
|
||||
"streams": [
|
||||
{"codec_type": "audio", "sample_rate": "48000"},
|
||||
{"codec_type": "video", "width": 1920, "height": 1080, "avg_frame_rate": "30000/1001"},
|
||||
],
|
||||
}
|
||||
out = vq._normalized_video_meta(obj)
|
||||
assert float(out.get("duration_sec") or 0.0) > 12.0
|
||||
assert int(out.get("width") or 0) == 1920
|
||||
assert int(out.get("height") or 0) == 1080
|
||||
assert float(out.get("fps") or 0.0) > 29.0
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue