Python: [Bug]: Media type detection documentation examples contain invalid base64
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Description
The public detect_media_type_from_base64 docstring includes two examples whose base64 payloads end in .... Executing either raises ValueError: Invalid base64 data provided. instead of returning the documented image/png value.
Minimal reproduction
from agent_framework import detect_media_type_from_base64
detect_media_type_from_base64(data_str="iVBORw0KGgo...")
detect_media_type_from_base64(data_uri="data:image/png;base64,iVBORw0KGgo...")
Each call fails independently. The detector validates base64 input, so abbreviated payloads cannot be executed as written.
Expected behavior and proposed fix
Use the valid base64-encoded PNG signature iVBORw0KGgo= in both documentation examples. The function identifies magic bytes, so those signature bytes are sufficient to demonstrate detection; they are not a complete image file. This is a documentation-only correction with no runtime or API changes.
Verification
Reproduced on Python 3.13.16 against main commit 40763bed1a5e94a1698ba9ebf009e5622eb099aa. Both code examples were extracted from the source docstring and executed locally. They fail before the correction and each returns image/png afterward. No model calls, credentials, or services were used.
I am preparing the focused documentation correction and checked for an existing overlapping issue or PR. Report and patch prepared with assistance from OpenAI Codex.
- 主要言語
- Python
- スター
- 13.9k
- フォーク
- 2.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 439
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/agent-framework のほかの issue
-
.NET python triage
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
microsoft/agent-framework#9092 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Python: raw-data content mappings lose annotations and attachment metadata対応中かも @moonbox3 が 9 日前に担当しました。 オープンpython triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/agent-framework#8632 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Python: Clarify when to use platform対応中かも @eavanvalkenburg が 8 日前に担当しました。 オープンpython triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/agent-framework#8599 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
.NET Compaction - Update docs to refer to `AIContextProvider` deep dive対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン.NET compaction documentation
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
microsoft/agent-framework#4629 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Python: [Feature]: Official first-class TypeScript SDK support対応中かも @rogerbarreto が今日担当しました。 オープン.NET agents python
microsoft/agent-framework#9226 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
microsoft/agent-framework の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
ansys/pydpf-core#3547 ·
メンテナーはふだん 1 日以内に返信
-
core
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vectorize-io/hindsight#5457 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recording対応中かも @ktz03 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
volcengine/OpenViking#5806 ·
メンテナーはふだん 1 日以内に返信
-
HTML: <template> content is extracted as document text対応中かも @ryanmeowy が今日担当しました。 オープンbug html
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
docling-project/docling#4714 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
APIv2 event data accepts a non-string reply and a NaN upper_bound対応中かも @awss1i が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
freedomofpress/securedrop#7946 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信