Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#3,274 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@PranavD2905 ya está trabajando en esto.

Desde el 16/10/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
ai, api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
4.6k
Forks
944
Merge medio
2 d 18 h
PR fusionados (30 d)
369

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PyRIT

Todos los issues de microsoft/PyRIT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.