Skip to main content

Tutorial: PDF to Text Converter Agent

This agent extracts text from PDF URLs and returns the output text exactly as it is, without interpreting or altering it. Uses the PDFCrowd endpoint to extract text.

PDF Crowd API Key

  1. Go to https://pdfcrowd.com/user/sign_up/. If you do not have an account, proceed to create one by following the registration process.
  2. Navigate to the left sidebar and click API v2 License.
alt text
  1. Then, copy your Username and API key and store in a secure location.
alt text

Agent Setup

  1. In SmythOS, navigate to the Templates tab.
alt text
  1. You can scroll down to find the PDF to Text Converter Agent or simply search for it in the Search tab, then click the Remix button.
alt text
  1. Allow the template to initialize and configure.

LLM Prompt Component Setup

  1. Locate the Basic Auth LLM Prompt component that has a missing key. Click the gear icon to access its settings.
alt text
  1. Click on the gear icon to open the settings, then input your username and password (your password is your API key) from PDF Crowd. The format should be username:APIkey do not add anything else. Just the username and password separated by a colon (no spaces). Remember to click the check mark to save your configuration.
alt text
  1. You’re all set!

Test the Agent

  1. Open the ChatBot embodiment and click on the chat icon.
alt text
  1. Prepare a PDF file for conversion into a text file and ask the agent to convert it.
    1. Sample PDF file: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
    2. Content: This is a test PDF file.
alt text
  1. Here’s the result!
alt text