/OpenAI_Function_Tools

Primary LanguageJupyter NotebookMIT LicenseMIT

OpenAI Function Calling PDF Reader

Overview

This notebook expands upon the OpenAI Function calling documentation, focusing on interacting with PDF files. It provides a practical example of using OpenAI's API to process and analyze PDF documents.

Example

Screenshot 2023-11-10 at 5 49 16 PM

Usage

API Key: Insert your OpenAI API key at the beginning of the notebook. PDF Processing: The notebook demonstrates how to download a PDF from the arXiv repository, convert the text into embeddings and save the images to a PNG. Data Visualization: There is a corse data extraction for images from the PDF file.

Features

This notebook includes:

  • Downloading academic papers from arXiv.
  • Reading and extracting information from PDF files.
  • Integrating with OpenAI's API for the embeddings model and LLM.
  • Displaying images via matplotlib.
  • Answering questions based on the PDF
  • Enabling the LLM to calling functions for displaying images and formatting equations

Important Note

Ensure that your OpenAI API key is kept secure and is not shared publicly. The notebook contains placeholders for adding your API key.

Disclaimer

This notebook is for educational purposes and serves as a guide to showcase the capabilities of OpenAI's function calling feature in conjunction with PDF processing. It is not intended for any specific production use.