Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets

オープン
#3,274 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@PranavD2905 がすでに取り組んでいます。

2026年10月17日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
ai, api

調査の方向性

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 の本文から書いたものです。

説明

feature-request help wanted
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_path pass 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。