https://discord.gg/botpress logo
With Vision enabled, bot still cannot extract info...
# 🤝help
l
Hello. The current goal is for the user to be able to upload a PDF and the bot extract information from the PDF. It was not working as "Vision" appeared to not be enabled. We were advised that you needed to upgrade to the Plus plan to enable vision, so we did. While we can enable "Vision" now, it appears the bot still cannot extract any information from uploaded files I tried uploading a PDF directly, converting the PDF to a jpg myself and uploading the jpg, as well as uploading the jpg to an image hosting site and giving the bot a link to the jpg. In all situations the inspect shows the bot cannot extract any content from the image. For relevance: -the bot is an Autonomous node -the "Vision Agent" is enabled -the autonomous node has the "Extract Content from Image" card -Vision is turned on in that area on the home screen under "Knowledgebase"
p
Here's a thread that discussed a similar use case, although it doesn't use the vision agent: https://discordapp.com/channels/1108396290624213082/1365062668443979898 Alternatively, could you send me a report so I can test it. I have replicated your implementation and see no apparent issue.
l
Thank you, that thread does look similar. How do I open a bpz file, or generate my own for you to test? Nevermind, found it!
@User Awesome, this is already a huge improvement and I can compare both and see why my bot cannot do what yours is doing. That said ideally the user will upload a PDF, i only tested it as a jpg (converting it myself manually) to try to debug exactly where the problem was is it possible for a bot like the one you built to do the same thing but with a PDF?
p
The vision agent takes in images only, unfortunately. For pdfs, I would resort to the solution proposed in the other thread.
l
Darn, still great to know, thank you again!
p
No problem :))
l
@prehistoric-airplane-85682 Sorry to bother you again. I imported the bot you made for the other user and it appears it still cant see PDFs. The other user never mentioned PDFs so it's possible we simply need a little tweak. (note the errors are regarding not having access to the improvement table or previous learnings, so i'd imagine not related to the issue at hand) https://cdn.discordapp.com/attachments/1366495828633456764/1366524431039725589/image.png?ex=6811428d&is=680ff10d&hm=f9e82445050f17dae918c4acb8a502e2627ffd2e6ac3060e57877ab56d24140b&
As a possible solution, apparently I can have the client upload the file, the bot recognize that it's a PDF, transition to another node that saves the PDF to our knowledgebase. Then the bot will be able to see what's on the PDF. Unfortunately the video that talks about this is in French (used auto translate) and he never actually shows how to do it
I was able to get the bot to transition to a 2nd workflow where it captured the PDF and executed this code (built by AI, I only loosely understand json): it gives an error that the file ID and knowledgebase ID both expect a string and received undefined. https://cdn.discordapp.com/attachments/1366495828633456764/1366651443838193765/image.png?ex=6811b8d7&is=68106757&hm=b9686b824f156770d75ee26640cb37993a8ecb0a5f5c8d3ec9f1e9e406ccbef3&
p
Regarding you last issue, javaScript sometimes is picky with the types, meaning you have to explicitly cast it as a string for it to be acceptable.
4 Views