Extracting an image from PDF using Azure OpenAI assistants GPT 4o

Mohamed Hussein 710 Reputation points
2024-11-12T18:10:43.09+00:00

Hi,

I was trying to fetch an image from a PDF file (attached) using the assistants playground

When i used file search option, it failed. But when i used code interpreter it succeeds

My question is when using assistants APIs, if used uploads a PDF file which's mix of text and images at most of cases, which tool should i assign FileSearch or Code interpreter

EmbeddedImage.pdf

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,080 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pavankumar Purilla 8,335 Reputation points Microsoft External Staff Moderator
    2024-11-12T19:04:32.9166667+00:00

    Hi Mohamed Hussein,
    Greetings & Welcome to the Microsoft Q&A forum! Thank you for posting your query!

    For extracting text and metadata from documents, such as PDFs. It works well for searching and analyzing the text content but may struggle with images and non-text elements in PDFs.

    The Code Interpreter is more versatile and can process complex file types, including PDFs that contain both images and text. It can be used to extract images.

    If the document is highly mixed with images, charts, and text and you need to extract images the Code Interpreter would be the better tool.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.