FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets
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
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
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.
- Vorherrschende Sprache
- Python
- Sterne
- 4.6k
- Forks
- 944
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 358
Entwicklungsumgebung
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
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/PyRIT
-
BUG: label queries only return the final conversation of an attackEvtl. vergeben @u7k4rs6 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
microsoft/PyRIT#3095 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
BUG Configuration keeps runtime-status errors after polling recoversEvtl. vergeben @joeyvictorino hat das vor 6 Tagen übernommen. OffenBug: triage GUI help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
microsoft/PyRIT#2868 · 6 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
feature-request
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 18/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 34/100
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/PyRIT
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
EchoTools/nevr-runtime#651 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug frontend rt sev-3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
noontide-co/mainbranch#1211 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersOffentriage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
dbt-labs/dbt#16784 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag