Skip to content

Commit 7b29670

Browse files
Revert "Pending changes exported from your codespace"
1 parent d152ea0 commit 7b29670

33 files changed

+4326
-0
lines changed

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
freegpt.js.org

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Ashish Agarwal
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
> [!WARNING]
2+
> FreeGPT.js/this project is not affiliated with ChatGPT in any kind. I'm not responsible for anything and this project is just for educational purposes.
3+
4+
<h1>FreeGPT.js</h1>
5+
6+
**🤖 A great, stable but free ChatGPT library with no authentication at all!**
7+
8+
> [!TIP]
9+
> If you are looking for a template or example, go ahead and look the branch **react**. It uses Next.js with FreeGPT.js to make a simple, but working, great and free unlimited chat application.
10+
> Or you can checkout my ChatGPT UI Clone + Implementation: [ChatGPT Clone with Next.js and FreeGPT.js][https://ashishagarwal.is-a.dev/chatgpt-clone/]
11+
12+
> Give it a try! Go [here](https://ashishagarwal.is-a.dev/chatgpt-clone) to test the FreeGPT.js out! It's free!
13+
14+
[![](https://img.shields.io/github/stars/ashishagarwal2023/freegptjs?label=Stars&color=af68ff&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/ashishagarwal2023/freegptjs/stargazers) [![](https://img.shields.io/badge/License-MIT-green.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/ashishagarwal2023/freegptjs/blob/main/LICENSE.md) [![](https://img.shields.io/github/commit-activity/m/ashishagarwal2023/freegptjs?label=Commits&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/ashishagarwal2023/freegptjs/commits/main)
15+
16+
<div id="intro">
17+
18+
## 💡 About
19+
20+
</div>
21+
22+
freegpt is a powerful javascript library you can use to get ChatGPT on your website, and its free!
23+
24+
- Simple, just one function
25+
- Open-source, free
26+
- Easy-to-use
27+
- Lightweight (yet optimally performant)
28+
- No authentication, free for all
29+
- Unlimited GPT 3.5 Model
30+
31+
<div id="importing">
32+
33+
## Examples
34+
Just one yet, but this list can be filled.
35+
36+
[ChatGPT Clone with Next.js and FreeGPT.js](https://ashishagarwal.is-a.dev/chatgpt-clone/)
37+
![ChatGPT Clone with Next.js and FreeGPT.js](freegpt.png)
38+
39+
You built something **cool**? Make a issue or PR!
40+
41+
## ⚡ Adding the library
42+
43+
</div>
44+
45+
Load `https://cdn.jsdelivr.net/gh/ashishagarwal2023/freegpt.js.org@master/src/freegpt.js` as a script in your `<head>` and call it after its loaded.
46+
47+
```html
48+
<script src="https://cdn.jsdelivr.net/gh/ashishagarwal2023/freegpt.js.org@master/src/freegpt.js"></script>
49+
```
50+
51+
> Load the freegpt lib the same way in your <head> in your layout of Next/React project, then use `await gpt.ask` to see if it works. If `gpt.ask` is not defined (probably when using with Nodejs), try `window.gpt.ask`. The library will only work on client-side.
52+
53+
## 💻 Usage
54+
55+
```js
56+
(async () => {
57+
let response = await gpt.ask("Explain variables in javascript");
58+
console.log(response); // you got it!
59+
})();
60+
```
61+
62+
And that is all.
63+
64+
> [!IMPORTANT]
65+
> If you are receiving error even when library is loaded (probably with React, and might also with Vue, Angular, etc), then use `window.gpt.ask` instead of `gpt.ask`.
66+
> And next thing, the `window.gpt.ask` is only available on client-side components, as you may know.
67+
68+
## 🤖 Why client-side?
69+
70+
This is a reverse-engineer of a ChatGPT AI service, [You.com](https://you.com).
71+
72+
They, for their own security, added Cloudflare Protection to the API. This can only be bypassed on JavaScript client-side.
73+
74+
> Please do not make issues regarding not working with Nodejs like #1
75+
76+
### Why I just made it?
77+
78+
Building AI applications isn't free, but I wanted to do it. This does not cost me a penny, feel free to use!
79+
80+
Give it a star if you want to help me keep it active.
81+
82+
It depends on **You.com**'s API, however its reverse engineered. Please note that I'm not responsible for anything and this is just for educational purpose.s
83+
84+
## 🤝Contributing
85+
86+
You are welcome! I'm looking for some cool peoples to help me push this project further!
87+
88+
> I'm currently in-active on this project but you could, if you wish, try to implement conversations! :D
89+
90+
PRs are welcome, good issues too!

assets/css/bootstrap-theme.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/bootstrap.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)