DEV Community

Ashish Agarwal
Ashish Agarwal

Posted on • Edited on

I Made A FREE ChatGPT JavaScript Library

Hey fellows, what's going on?

FreeGPT.js

I just coded a library that allows you to use AI for free without any vertification kind of thing! It is literally a piece of code, althought a simple function, but it is a unlimited GPT 3.5 model! You are allowed to try it, come on!

Repo link - https://github.com/devashish2024/freegptjs
Demo - https://devashish2024.github.io/chatgpt-clone

Please give me suggestions and I will be happy. It is available on jsDelivr also, and here's a way you can use it:

<script src="https://cdn.jsdelivr.net/gh/ashishagarwal2023/freegptjs/src/freegpt.min.js"></script>
Enter fullscreen mode Exit fullscreen mode

Load in your head, then call it in body:

(async () => {
  let response = await gpt.ask("Explain variables in javascript");
  console.log(response); // you got it!
})();
Enter fullscreen mode Exit fullscreen mode

And its it!

Wrapping up

Now as you saw my project, don't forget to give a star and follow me on github!
Repo link - https://github.com/ashishagarwal2023/freegptjs
Demo - https://devashish2024.github.io/chatgpt-clone

It is based on a You.com's GPT 3.5 Model, I reverse-engineered, which was literally not authenicated - no tokens, its free!

The reason I made it using JavaScript for CDN is: it has Cloudflare security so NodeJS/Python was not able to get the API or scrap it. (using a free scraper, because who pays?)

Top comments (3)

Collapse
 
khateeboveskey profile image
A.Rahman Al-Khateeb

This is insane!!!

Collapse
 
chiefkarim profile image
chief karim

the demo link doesn't work

Collapse
 
devashish2024 profile image
Ashish Agarwal