4 ms·
Here's a version of that which should work for any page, whether or not they allow ChatGPT URL access: javascript:window.open('https://chatgpt.com/?q=summa
by simonw 2y ago
Here's a version of that which should work for any page, whether or not they allow ChatGPT URL access:
javascript:window.open('https://chatgpt.com/?q=summarize this page in 100 words: '+encodeURIComponent(document.body.innerText),'_blank');
I swapped window.location.href for document.body.innerText
- hu3 2y agoNice! Thank you! I just wonder if browsers will limit the amount of characters in URLs. If memory serves me, there was a limit. But it might be high enough to work fro most pages.
- gloosx 2y agoIt's around 8KB now – so text bigger than 8 thousand characters will return: "414 Request-URI Too Large". Anyway the document.body.innerText contains all things on the site, including links, menus, buttons etc just 1 per newline. LLM will only recognise if it previously scanned the same website and it did not change much since the last training set. Some arbitrary websites it will not recognise this way and start hallucinating one because innerText removes all the structure from it.
- a57721 2y agoModern browsers are not an issue here, e.g. chromium allows 2MB; the issue is with web server's limits.
- hu3 2y agoIndeed, I'm getting Cloudflare error "414 Request-URI Too Large" for this HN post which isn't large. But the URL bar was not the problem.
- thih9 2y agoI’m sure Openai likes this use case, a neat way to access data where they are otherwise blocked. Personally I’d worry about using this accidentally and with some sensitive data (eg logins). I do like the idea though, I’d use this with a local model.