by xur17 · 3y ago · 0 comments
On the first part: I've been trying to build a tool that parses webpages using ChatGPT, but I'm struggling to figure out the best way to pass the website content over. Some options I have tried:
* Raw HTML - expensive, and in a lot of cases doesn't fit in prompt input
* OCR - works better than I would have expected, but can struggle with certain fonts, and a lot of the webpage structure is lost
Maybe stripping the styling and Javascript from webpages would work? Did you do the OCR as part of the complete model or did you make it a separate step? Machine learning is usually much better in one step.
For more context: I have this setup as an api that I feed url + typescript definitions to, and have chatgpt output information from the website in the specified typescript definition.
For example, I can use {product_price: float, product_name: str} + a url as the input, and fairly accurately get product price info across ALL product websites. It's kind of amazing that it's able to do this much just based upon the typescript variable names + raw OCR output.
Wait till they make the image input available via the API, I guess