FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets
メンテナーはふだん 2 日以内に返信
@PranavD2905 がすでに取り組んでいます。
2026年10月17日 から。
評価
調査の方向性
Start from the binary_path message pieces that PDFConverter already produces, then read how OpenAIChatTarget and OpenAIResponseTarget build their request payloads and declare input capabilities. Reading the storage abstraction used to load files is also needed. Done means a request containing a PDF plus text serializes correctly for both targets, passes capability validation, survives history rebuilding, and has regression tests and a documented example.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
PyRIT represents files such as PDFs using binary_path, and converters such as PDFConverter already produce this type. However, OpenAIChatTarget and OpenAIResponseTarget do not currently support sending these files as native file inputs.
This leaves a gap between generating a file and submitting it to a model for document-based testing.
Describe the solution you'd like
Support binary_path message pieces in both targets, starting with PDFs and extending to other file formats where the selected API and model support them.
Expected behavior:
- Read the referenced file through PyRIT's storage abstraction and serialize it into the appropriate Chat Completions or Responses API file-input format.
- Support file-only messages, files alongside text instructions, and multiple files where supported by the API.
- Update target input capabilities so requests containing
binary_pathpass validation. - Preserve file inputs when rebuilding conversation history.
- Surface clear errors for unreadable files and unsupported inputs. Document API/model-specific format and size restrictions rather than implying that all binary files are supported.
Include request-serialization and regression tests for both targets, plus a documented example that sends a PDF with a text instruction.
Describe alternatives you've considered, if relevant
Extracting text from the PDF or converting its pages to images can work for some use cases, but changes how the model receives the document and does not exercise native file handling.
Manually building API requests outside these targets requires users to duplicate request-building logic.
Additional context
Related issues #423, #415, and #541 cover file generation and injection. This request covers the separate target responsibility of sending those files to the model.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 367
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: label queries only return the final conversation of an attack対応中かも @u7k4rs6 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/PyRIT#3095 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoft/PyRIT#3325 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 53/100
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
メンテナーはふだん 2 日以内に返信
-
BUG: Tone, Tense, Translation, Noise, ScientificTranslation and Variation converter identifiers ignore a custom prompt_template対応中かも @ShivamSharma43 が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
webrecorder/warcio#209 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Jeffy123-zhu/logspecter#20 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信