Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by huijzer on Monday March 20, 2023 @10:31AM
(#35232020)
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.
Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by xur17 on Monday March 20, 2023 @10:39AM
(#35232152)
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.
Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by huijzer on Monday March 20, 2023 @10:57AM
(#35232437)
> 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
Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by xur17 on Monday March 20, 2023 @11:25AM
(#35232910)
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.
Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by call-me-al on Tuesday March 21, 2023 @12:17AM
(#35242497)
have you already tried this: https://github.com/mozilla/readability ?
Re:Show HN: Chatblade – A CLI Swiss Army Knife for ChatGPT
by 1xdevloper on Tuesday March 21, 2023 @08:16AM
(#35245162)
The Selection API is your friend: https://developer.mozilla.org/en-US/docs/Web/API/Selection
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