chatgpt.js

chatgpt.js

A powerful client-side JavaScript library for ChatGPT.

5.0
1 review

140 followers

chatgpt.js is a powerful JavaScript library that allows for super easy interaction w/ the ChatGPT DOM. • Feature-rich • Object-oriented • Easy-to-use • Lightweight (yet optimally performant)
chatgpt.js gallery image
chatgpt.js gallery image
chatgpt.js gallery image
Free
Launch Team
agent by Firecrawl
agent by Firecrawl
Gather structured data wherever it lives on the web
Promoted

What do you think? …

Adam Lui
Hey guys, sharing this new ChatGPT JavaScript library that powers many award-winning & popular apps, including: - DuckDuckGPT - ChatGPT Infinity - Automatic ChatGPT DAN - ChatGPT Widescreen It just passed 100,000 monthly jsDelivry hits, so its popularity is growing, probably because it's reallly easy to use: https://chatgpt.js.org/#/?id=usage You can check out an extended list of popular apps that use this library here: https://chatgpt.js.org/#/?id=mad...
Fabio Viola
@adamlui I had seen this library before on GitHub since it is used by several projects. Nice work, Adam!
Adam Lui
@tailormeta thank you!!
How does chatgpt.js handle error management when interacting with the ChatGPT DOM? Are there any built-in features to aid developers in this aspect? And by the way, congrats on the launch!
Adam Lui
@ricardo_luz thanks! The lib uses fallbacks where possible so that apps can continue to run for a max positive user experience, for example: var menuBtn = document.querySelector('nav button[id*="headless"]') || {}; ..then if OpenAI changed the menu button, the lib selected an empty object so the app won't crash, and the lib is patched ASAP and served via the https://code.chatgptjs.org/chatg... so no maintenance required by app author (unless the jsDelivr URL was used which is required for userscripts that post to repo's like Greasy Fork that maintain a whitelist of pre-approved CDNs, then bumping the version is required) But even then, error logging is used to provide aid to devs on DOM updates that potentially beak things: try { menuBtn.click(); } catch (error) { console.error('🤖 chatgpt.js >> Headless menu not found'); return; } ...so if error is observed, you can quickly report it on GitHub and it will be patched right away (or even submit a pull request yourself!)
Isaac Booker
Wow cool, Congrats Adam on your launch!
Adam Lui
@isaac_booker thanks bro!
Tarun Paliwal
Congratulations for the launch team 🚀
Adam Lui
@tarunpaliwal thank you!!
Dávid Sipos
Great work Adam! Congrats on your launch! Nice implementation!
Adam Lui
@david_sipos thanks for the kind words!!
Roman Puliyan
Great work!
Adam Lui
Nikolai Persiianov
Congratulations! What are some unique features or aspects of your project that set it apart from competitors? How do you plan to stay ahead in the market?
Adam Lui
@nikolai_persiianov Thank you! Currently there are no competitors for client-side ChatGPT libraries (a ton of API wrappers exist in many languages for back-end) so that is likely partially responsible for the great traction thus far. Apart from being unique in existence, a lot of the functions are quite easy to use but very powerful. For example, chatgpt.alert() is used to easily trigger alerts to auto-updates when apps get updated, resulting in beautiful alerts like this by simply supplying a title, msg & named button function as arguments: ...that also drive traffic where you want (GitHub, blog, etc.) when you include links, to increase social activity on other platforms. Also the needs of users are used to build out next features (for example, someone here https://github.com/orgs/chatgptj... needed it to render HTML, and the function was added within days) and because it's open-source yet very actively maintained, that keeps it ahead in the market at light speed (compare this to issues raised in some other repos take up to months to resolve)
12
Next
Last