Name is self-explanatory; it's like ChatGPT or Claude, but formatted on documents, PDFs, text files, markdown... etc. Initially, I started using ChatPDF. I tried using it in different languages to parse documents differently, which it did. But it could not format them correctly, that's why I built Chat with PDFs 😉
My biggest challenge was how to make this cost-effective for me. I wanted to make this service free but I had to pay for OpenAI. I ended up figuring out the best package for OpenAI's API plan for my personal use thus far. Oh, and formatting the text 😜
I have experience with ML and breaking down data into chunks for the algorithm or, in this case, PDFs & documents; however, I wasn't really familiar with using Pinecone that well, so I followed Sonny Sangha's YouTube tutorial and customized the app to my liking. I focused on letter formatting for the chat.
What Letter Formatting Involves:
To handle letter formatting efficiently, I used a combination of CSS properties and JavaScript. Here's a breakdown:
dir
attribute (ltr
or rtl
) based on the language.\u200E
(LTR) and \u200F
(RTL) for inline text to ensure proper alignment.Supports LTR and RTL text with precise letter shaping for scripts with cursive fonts like Arabic, and context-aware responses powered by OpenAI and Pinecone. It supports multiple document formats, ensures accurate language parsing, and is optimized for responsive, cost-effective performance on Vercel with Tailwind CSS.
Hassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan Mango