Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#3,274 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@PranavD2905 arbeitet bereits daran.

Seit 16.10.2026.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
ai, api

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
4.6k
Forks
944
Ø Merge
2 T. 18 Std.
Gemergte PRs (30 T.)
358

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/PyRIT

Alle Issues in microsoft/PyRIT

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.