Skip to content

.Net: New Feature: Allow PDFs to be sent as ImageContent to Azure Open AI Chat Completion models #12688

@somatech-uk

Description

@somatech-uk

name: Feature request
about: Suggest an idea for this project


I'm having to convert PDF files to PNG before sending to Azure Open AI models but this is causing the PNG files to end up several magnitudes larger than the original PDF files and getting close to the 20MB limit.

With the Gemini models, I'm able to send PDF files are ImageContent without issue but when I try this with any of the Azure Open AI models I receive the following error message:

Invalid image URL. The URL must be a valid HTTP or HTTPS URL, or a data URL with base64 encoding.

Unless, is there another way to send PDF files to the Open AI models without having to convert to an image file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codetriage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions