gpt4free/README.md

259 lines
15 KiB
Markdown
Raw Normal View History

2023-05-08 01:50:35 +03:00
**I am busy for the next weeks for various reasons, so the code may get deprecated, but starting back full speed soon with plenty new features**
2023-05-07 01:23:48 +03:00
2023-05-08 01:50:35 +03:00
What can I do to contribute ?
you reverse a site from this list: [sites-to-reverse](https://github.com/xtekky/gpt4free/issues/40), and add it to [`./testing`](https://github.com/xtekky/gpt4free/tree/main/testing) or refractor it and add it to [`./gpt4free`](https://github.com/xtekky/gpt4free/tree/main/gpt4free)
___
2023-05-02 21:20:02 +03:00
2023-05-18 11:22:15 +03:00
countdown until major update
<img src="https://i.countdownmail.com/2kdr2o.gif" border="0" alt="countdownmail.com"/>
___
2023-05-02 21:20:02 +03:00
<p>You may join our discord: <a href="https://discord.com/invite/gpt4free">discord.gg/gpt4free<a> for further updates. <a href="https://discord.gg/gpt4free"><img align="center" alt="gpt4free Discord" width="22px" src="https://raw.githubusercontent.com/peterthehan/peterthehan/master/assets/discord.svg" /></a></p>
<img alt="gpt4free logo" src="https://user-images.githubusercontent.com/98614666/233799515-1a7cb6a3-b17f-42c4-956d-8d2a0664466f.png">
2023-05-01 23:21:45 +03:00
## Legal Notice <a name="legal-notice"></a>
2023-05-02 11:44:36 +03:00
This repository is _not_ associated with or endorsed by providers of the APIs contained in this GitHub repository. This project is intended **for educational purposes only**. This is just a little personal project. Sites may contact me to improve their security or request the removal of their site from this repository.
2023-05-01 23:21:45 +03:00
Please note the following:
2023-05-02 11:44:36 +03:00
1. **Disclaimer**: The APIs, services, and trademarks mentioned in this repository belong to their respective owners. This project is _not_ claiming any right over them nor is it affiliated with or endorsed by any of the providers mentioned.
2023-05-04 14:42:37 +03:00
2. **Responsibility**: The author of this repository is _not_ responsible for any consequences, damages, or losses arising from the use or misuse of this repository or the content provided by the third-party APIs. Users are solely responsible for their actions and any repercussions that may follow. We strongly recommend the users to follow the TOS of the each Website.
2023-05-01 23:21:45 +03:00
3. **Educational Purposes Only**: This repository and its content are provided strictly for educational purposes. By using the information and code provided, users acknowledge that they are using the APIs and models at their own risk and agree to comply with any applicable laws and regulations.
2023-05-19 16:17:27 +03:00
4. **Indemnification**: Users agree to indemnify, defend, and hold harmless the author of this repository from and against any and all claims, liabilities, damages, losses, or expenses, including legal fees and costs, arising out of or in any way connected with their use or misuse of this repository, its content, or related third-party APIs.
2023-05-02 11:40:12 +03:00
2023-05-19 16:17:27 +03:00
5. **Updates and Changes**: The author reserves the right to modify, update, or remove any content, information, or features in this repository at any time without prior notice. Users are responsible for regularly reviewing the content and any changes made to this repository.
2023-05-02 11:44:36 +03:00
By using this repository or any code related to it, you agree to these terms. The author is not responsible for any copies, forks, or reuploads made by other users. This is the author's only account and repository. To prevent impersonation or irresponsible actions, you may comply with the GNU GPL license this Repository uses.
<br>
2023-05-01 23:21:45 +03:00
<img src="https://media.giphy.com/media/LnQjpWaON8nhr21vNW/giphy.gif" width="100" align="left">
Just API's from some language model sites.
2023-05-01 03:30:46 +03:00
# Related gpt4free projects
<table>
<thead align="center">
<tr border: none;>
<td><b>🎁 Projects</b></td>
<td><b>⭐ Stars</b></td>
<td><b>📚 Forks</b></td>
<td><b>🛎 Issues</b></td>
<td><b>📬 Pull requests</b></td>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/xtekky/gpt4free"><b>gpt4free</b></a></td>
<td><a href="https://github.com/xtekky/gpt4free/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/xtekky/gpt4free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/gpt4free/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/xtekky/gpt4free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/gpt4free/issues"><img alt="Issues" src="https://img.shields.io/github/issues/xtekky/gpt4free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/gpt4free/pulls"><img alt="Pull Requests" src="https://img.shields.io/github/issues-pr/xtekky/gpt4free?style=flat-square&labelColor=343b41"/></a></td>
</tr>
2023-05-04 17:16:38 +03:00
<tr>
<td><a href="https://github.com/xiangsx/gpt4free-ts"><b>gpt4free-ts</b></a></td>
<td><a href="https://github.com/xiangsx/gpt4free-ts/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/xiangsx/gpt4free-ts?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xiangsx/gpt4free-ts/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/xiangsx/gpt4free-ts?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xiangsx/gpt4free-ts/issues"><img alt="Issues" src="https://img.shields.io/github/issues/xiangsx/gpt4free-ts?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xiangsx/gpt4free-ts/pulls"><img alt="Pull Requests" src="https://img.shields.io/github/issues-pr/xiangsx/gpt4free-ts?style=flat-square&labelColor=343b41"/></a></td>
</tr>
<tr>
<td><a href="https://github.com/xtekky/chatgpt-clone"><b>ChatGPT-Clone</b></a></td>
<td><a href="https://github.com/xtekky/chatgpt-clone/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/xtekky/chatgpt-clone?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/chatgpt-clone/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/xtekky/chatgpt-clone?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/chatgpt-clone/issues"><img alt="Issues" src="https://img.shields.io/github/issues/xtekky/chatgpt-clone?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/xtekky/chatgpt-clone/pulls"><img alt="Pull Requests" src="https://img.shields.io/github/issues-pr/xtekky/chatgpt-clone?style=flat-square&labelColor=343b41"/></a></td>
</tr>
2023-05-01 03:35:00 +03:00
<tr>
2023-05-01 18:27:57 +03:00
<td><a href="https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free"><b>ChatGpt Discord Bot</b></a></td>
<td><a href="https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/mishalhossin/Discord-Chatbot-Gpt4Free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/mishalhossin/Discord-Chatbot-Gpt4Free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free/issues"><img alt="Issues" src="https://img.shields.io/github/issues/mishalhossin/Discord-Chatbot-Gpt4Free?style=flat-square&labelColor=343b41"/></a></td>
<td><a href="https://github.com/mishalhossin/Coding-Chatbot-Gpt4Free/pulls"><img alt="Pull Requests" src="https://img.shields.io/github/issues-pr/mishalhossin/Discord-Chatbot-Gpt4Free?style=flat-square&labelColor=343b41"/></a></td>
2023-05-01 03:35:00 +03:00
</tr>
</tbody>
</table>
2023-04-26 01:49:08 +03:00
2023-04-02 00:04:33 +03:00
## Table of Contents
2023-04-30 14:18:28 +03:00
| Section | Description | Link | Status |
| ------- | ----------- | ---- | ------ |
| **To do list** | List of tasks to be done | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#todo) | - |
| **Current Sites** | Current websites or platforms that can be used as APIs | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#current-sites) | - |
| **Best Sites for gpt4** | Recommended websites or platforms for gpt4 | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#best-sites) | - |
| **Streamlit GPT4Free GUI** | Web-based graphical user interface for interacting with gpt4free | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#streamlit-gpt4free-gui) | - |
| **Docker** | Instructions on how to run gpt4free in a Docker container | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#docker-instructions) | - |
| **ChatGPT clone** | A ChatGPT clone with new features and scalability | [![Link to Website](https://img.shields.io/badge/Link-Visit%20Site-blue)](https://chat.chatbot.sex/chat) | - |
| **How to install** | Instructions on how to install gpt4free | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#install) | - |
| **Usage Examples** | | | |
| `theb` | Example usage for theb (gpt-3.5) | [![Link to File](https://img.shields.io/badge/Link-Go%20to%20File-blue)](gpt4free/theb/README.md) | ![Active](https://img.shields.io/badge/Active-brightgreen) |
| `forefront` | Example usage for forefront (gpt-4) | [![Link to File](https://img.shields.io/badge/Link-Go%20to%20File-blue)](gpt4free/forefront/README.md) | ![Active](https://img.shields.io/badge/Active-brightgreen) | ||
| `quora (poe)` | Example usage for quora | [![Link to File](https://img.shields.io/badge/Link-Go%20to%20File-blue)](gpt4free/quora/README.md) | ![Active](https://img.shields.io/badge/Active-brightgreen) |
| `you` | Example usage for you | [![Link to File](https://img.shields.io/badge/Link-Go%20to%20File-blue)](gpt4free/you/README.md) | ![Active](https://img.shields.io/badge/Active-brightgreen) |
| `deepai` | Example usage for DeepAI (gpt-3.5, with chat) | [![Link to File](https://img.shields.io/badge/Link-Go%20to%20File-blue)](gpt4free/deepai/README.md) | ![Active](https://img.shields.io/badge/Active-brightgreen) |
2023-04-30 14:18:28 +03:00
| **Try it Out** | | | |
| Google Colab Jupyter Notebook | Example usage for gpt4free | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DanielShemesh/gpt4free-colab/blob/main/gpt4free.ipynb) | - |
| replit Example (feel free to fork this repl) | Example usage for gpt4free | [![](https://img.shields.io/badge/Open%20in-Replit-1A1E27?logo=replit)](https://replit.com/@gpt4free/gpt4free-webui) | - |
| **Legal Notice** | Legal notice or disclaimer | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#legal-notice) | - |
| **Copyright** | Copyright information | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#copyright) | - |
| **Star History** | Star History | [![Link to Section](https://img.shields.io/badge/Link-Go%20to%20Section-blue)](#star-history) | - |
2023-04-25 04:53:08 +03:00
## To do list <a name="todo"></a>
2023-04-23 21:08:50 +03:00
2023-04-29 16:29:54 +03:00
- [x] Add a GUI for the repo
2023-04-29 01:58:49 +03:00
- [ ] Make a general package named `gpt4free`, instead of different folders
- [ ] Live api status to know which are down and which can be used
- [ ] Integrate more API's in `./unfinished` as well as other ones in the lists
- [ ] Make an API to use as proxy for other projects
- [ ] Make a pypi package
2023-04-01 15:53:30 +03:00
2023-04-02 00:04:33 +03:00
## Current Sites <a name="current-sites"></a>
2023-04-01 15:53:30 +03:00
2023-04-29 16:29:54 +03:00
| Website s | Model(s) |
| ------------------------------------------------ | -------------------------------- |
| [forefront.ai](https://chat.forefront.ai) | GPT-4/3.5 |
| [poe.com](https://poe.com) | GPT-4/3.5 |
| [writesonic.com](https://writesonic.com) | GPT-3.5 / Internet |
| [t3nsor.com](https://t3nsor.com) | GPT-3.5 |
| [you.com](https://you.com) | GPT-3.5 / Internet / good search |
| [sqlchat.ai](https://sqlchat.ai) | GPT-3.5 |
| [bard.google.com](https://bard.google.com) | custom / search |
| [bing.com/chat](https://bing.com/chat) | GPT-4/3.5 |
2023-05-01 20:24:01 +03:00
| [italygpt.it](https://italygpt.it) | GPT-3.5 |
| [deepai.org](https://deepai.org/chat) | GPT-3.5 / chat support |
2023-04-22 21:50:35 +03:00
2023-04-29 16:29:54 +03:00
## Best sites <a name="best-sites"></a>
2023-03-29 22:00:39 +03:00
2023-04-22 16:26:57 +03:00
#### gpt-4
2023-04-29 16:29:54 +03:00
2023-04-29 12:25:24 +03:00
- [`/forefront`](gpt4free/forefront/README.md)
2023-04-22 16:26:57 +03:00
#### gpt-3.5
2023-04-29 16:29:54 +03:00
2023-04-29 12:25:24 +03:00
- [`/you`](gpt4free/you/README.md)
2023-04-02 00:04:33 +03:00
2023-04-29 16:29:54 +03:00
## Install <a name="install"></a>
Download or clone this GitHub repo
2023-04-22 20:59:37 +03:00
install requirements with:
2023-04-29 16:29:54 +03:00
2023-04-22 15:54:01 +03:00
```sh
2023-05-05 02:09:13 +03:00
python3 -m venv venv
. venv/bin/activate
2023-04-22 15:54:01 +03:00
pip3 install -r requirements.txt
```
2023-04-25 12:16:05 +03:00
## Install ffmpeg
```sh
sudo apt-get install ffmpeg
```
## Connect VPN if needed and get proxy (Optional)
```sh
echo "$http_proxy" # http://127.0.0.1:8889/
```
## Set proxy in gpt4free/you/__init__.py (Optional)
```
diff --git a/gpt4free/you/__init__.py b/gpt4free/you/__init__.py
index 11847fb..59d1162 100644
--- a/gpt4free/you/__init__.py
+++ b/gpt4free/you/__init__.py
@@ -38,6 +38,7 @@ class Completion:
if chat is None:
chat = []
+ proxy = '127.0.0.1:8889'
proxies = {'http': 'http://' + proxy, 'https': 'http://' + proxy} if proxy else {}
client = Session(client_identifier='chrome_108')
```
2023-04-25 20:59:40 +03:00
## To start gpt4free GUI <a name="streamlit-gpt4free-gui"></a>
2023-04-29 16:29:54 +03:00
2023-05-12 08:44:17 +03:00
##### Note: streamlit app collects heavy analytics even when running locally. This includes events for every page load, form submission including metadata on queries (like length), browser and client information including host ips. These are all transmitted to a 3rd party analytics group, Segment.com.
Move `streamlit_app.py` from `./gui` to the base folder then run:
2023-04-25 12:16:05 +03:00
`streamlit run streamlit_app.py` or `python3 -m streamlit run streamlit_app.py`
2023-04-17 02:14:41 +03:00
2023-05-05 02:09:13 +03:00
```sh
cp gui/streamlit_app.py .
streamlit run streamlit_app.py
```
2023-04-25 20:59:40 +03:00
## Docker <a name="docker-instructions"></a>
2023-04-29 16:29:54 +03:00
2023-04-25 04:54:19 +03:00
Build
2023-04-29 16:29:54 +03:00
2023-04-25 04:54:19 +03:00
```
docker build -t gpt4free:latest .
2023-04-25 04:54:19 +03:00
```
2023-04-29 16:29:54 +03:00
2023-04-25 04:54:19 +03:00
Run
2023-04-29 16:29:54 +03:00
2023-04-25 04:54:19 +03:00
```
docker run -p 8501:8501 gpt4free:latest
```
2023-04-29 16:29:54 +03:00
## Deploy using docker-compose
Run the following:
```
2023-05-01 17:47:25 +03:00
docker-compose up --build -d
2023-04-29 16:29:54 +03:00
```
2023-04-24 03:25:28 +03:00
## ChatGPT clone
2023-04-29 16:29:54 +03:00
> Currently implementing new features and trying to scale it, please be patient it may be unstable
> https://chat.g4f.ai/chat
2023-04-29 16:29:54 +03:00
> This site was developed by me and includes **gpt-4/3.5**, **internet access** and **gpt-jailbreak's** like DAN
> Run locally here: https://github.com/xtekky/chatgpt-clone
2023-04-29 16:29:54 +03:00
## Copyright:
This program is licensed under the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.txt)
2023-04-17 02:04:20 +03:00
2023-05-18 10:21:18 +03:00
Most code, with the exception of `quora/api.py` and `deepai/__init__.py` (by [ading2210](https://github.com/ading2210)), has been written by me, [xtekky](https://github.com/xtekky).
2023-04-17 02:04:20 +03:00
2023-04-23 12:46:36 +03:00
### Copyright Notice: <a name="copyright"></a>
2023-04-29 16:29:54 +03:00
2023-04-17 02:04:20 +03:00
```
2023-04-29 16:29:54 +03:00
xtekky/gpt4free: multiple reverse engineered language-model api's to decentralise the ai industry.
2023-04-17 02:04:20 +03:00
Copyright (C) 2023 xtekky
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
```
## Star History <a name="star-history"></a>
<a href="https://github.com/xtekky/gpt4free/stargazers">
<img width="500" alt="Star History Chart" src="https://api.star-history.com/svg?repos=xtekky/gpt4free&type=Date">
</a>