Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is the webpage content passed to ChatGPT, or is this more intended to be a way to easily use chatgpt?

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




Let me know if you got it working. I'm looking for such a thing too!

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.


I did OCR as a separate step (essentially 1. load webpage, 2. screenshot, 3. ocr, 4. ocr output + question into chatgpt). What does it mean to do it all as one step / how would I got about doing that with ChatGPT?

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.


> What does it mean to do it all as one step / how would I got about doing that with ChatGPT?

Wait till they make the image input available via the API, I guess


That makes sense, and was my plan, but the costs for chat-gpt-4 are a bit higher than is economically viable for most of my use cases.


have you already tried this: https://github.com/mozilla/readability ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: