flat-fuchsia
flat-fuchsiaβ€’6mo ago

[Solved βœ…] Is there a tool that can handle PDF files ?

I've tried using the IMAGE_ANALYSER_ANALYSE, with and without the FILETOOL_OPEN_FILE, but i'm not being able to even detect it u.u i think gpt-4o can natively process them, but is there a way to detect the pdfs as pdfs files so the model can process them ? thanks πŸ˜„
16 Replies
inland-turquoise
inland-turquoiseβ€’6mo ago
What do you wanna do πŸ€” Wanna list down PDFs from the folder and...??
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
No, I wanna open pdfs received via slack (and more endpoints eventually) and extract data from them I've made a script for it, which uses the image analyser for images, and pytesseract/pil/pdf2image as pre process so then the agents do their stuff Basically that tools extracts the raw text from different pdfs (text pdf or scans pdfs) and saves the output on a var, then we pass that bar to the agents if we have docs like that
inland-turquoise
inland-turquoiseβ€’6mo ago
Actually model can't process the pdf directly. So you have to use a pdf parsing tool πŸ™‚ If you need any other, lemme know πŸ˜„
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
im facing an issue not directly related to this, but maybe you can guide me on what's going on ive made my stuff, im getting my pdf processed, and the agents extracts the whole data that i need (40 rows from a scanned page) the data gets accurately extracted and sent to slack, but another task, which basically makes it to csv format and stores it on the output_file argument output, only gets part of the data ive tried with both claude and gpt4o models and also both combined for different parts, and this final task always fails. any thoughts on what may this be ? maybe a tokens limit ? im not sure on where the max_tokens argument must be passed x.x
inland-turquoise
inland-turquoiseβ€’6mo ago
What are you using for initialising llm class?? Let's say if you are using langchain and openai then your code might have:
from langchain_openai import ChatOpenAI


llm = ChatOpenAI(...)
from langchain_openai import ChatOpenAI


llm = ChatOpenAI(...)
Inside ChatOpenAI you can manage all the llm related things like max_tokens, temperature, etc
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
ooooh thanks a lot sir! πŸ˜„ for some reason i was convinced that it must be on the agent class x.x
inland-turquoise
inland-turquoiseβ€’6mo ago
I am pleased to be able to help you sir πŸ™‚ Yea but again if you break anything related to composio, remember me πŸ‘€πŸ™Œ
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
may create something similar to slack integration for facebook messenger be too complicated ? i've seen something on the tools page, but i guess it has been deprectaed
inland-turquoise
inland-turquoiseβ€’6mo ago
You can create a new post at #πŸ’‘β”‚feature-request and our team will respond you related to that details
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
sure, omw
inland-turquoise
inland-turquoiseβ€’6mo ago
You can also mention for what use-case you want to....
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
sure. its basically the same stuff that i've done here send messages to a bot, ask it to extract data from pdf/images/whatever the data comes from, and normalize it
inland-turquoise
inland-turquoiseβ€’6mo ago
Got it, cool then looking forward to it πŸ˜„
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
its a handy tool πŸ˜„ or it will be, the normalizing part is still being worked on xD but i guess that its just the models are runing out of token output
inland-turquoise
inland-turquoiseβ€’6mo ago
Yea it happens and that's why we are developers XD
flat-fuchsia
flat-fuchsiaOPβ€’6mo ago
xD

Did you find this page helpful?