fix: 视频输入改为 base64 内联上传(适配 Gemini 2.0+)#1203
Merged
Merged
Conversation
Gemini 2.0 起不再支持外部 HTTP URL 视频输入,仅支持: - base64 内联数据 - Files API - YouTube URL 将 bilibili 视频解析和文件视频描述的视频传递方式从 HTTP URL 改为 base64 data URI 内联上传,确保与 Gemini 2.0+ 兼容。 变更文件: - utils/tools/bilibili.py: bilibili 视频总结改用 base64 - utils/file.py: 视频文件描述改用 base64
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
xxtg666
requested changes
Jun 12, 2026
Co-authored-by: xxtg666 <xxtg666@gmail.com>
xxtg666
reviewed
Jun 12, 2026
xxtg666
approved these changes
Jun 12, 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.
变更原因\n\nGemini 2.0 起不再支持外部 HTTP URL 视频输入,仅支持:\n- base64 内联数据\n- Files API\n- YouTube URL\n\n## 变更内容\n\n将 bilibili 视频解析和文件视频描述的视频传递方式从 HTTP URL 改为 base64 data URI 内联上传。\n\n### 变更文件\n- : bilibili 视频总结改用 base64\n- : 视频文件描述改用 base64\n\n## 技术细节\n\n\n\n## 注意事项\n\n- base64 编码会增加约 33% 的体积,对大视频文件可能有内存压力\n- 现有的 和 静态文件服务端点保留未动,其他模块可能仍需要\n\n---\n\n请 @xxtg666 审核 🐱