Giter Club home page Giter Club logo

freegpt's Introduction

FreeGPT WebUI

GPT 3.5/4

βŒπŸ”‘ NOT REQUIRE ANY API KEY

This project features a WebUI utilizing the G4F API.
Experience the power of ChatGPT with a user-friendly interface, enhanced jailbreaks, and completely free.

🚧 Known bugs:

  • API Provider redirecting GPT-4 model to GPT-3.5;
  • Auto Proxy is not working.

Coding to solve as quickly as possible

Table of Contents

To-Do List βœ”οΈ

  • Integrate the free GPT API into the WebUI
  • Create Docker support
  • Improve the Jailbreak functionality
  • Add the GPT-4 model
  • Enhance the user interface
  • Auto Proxy
  • Enable editing and creating Jailbreaks/Roles in the WebUI
  • Migrate the interface to React.js (?)

Getting Started βœ…

To get started with this project, you'll need to clone the repository and have Python installed on your system.

Cloning the Repository πŸ“₯

Run the following command to clone the repository:

git clone https://github.com/ramonvc/freegpt-webui.git

Install Dependencies πŸ”§

Navigate to the project directory:

cd freegpt-webui

Install the dependencies:

pip install -r requirements.txt

Running the Application πŸš€

To run the application, run the following command:

python run.py

Access the application in your browser using the URL:

http://127.0.0.1:1338

or

http://localhost:1338

Auto Proxy πŸ”‘

The application includes an auto proxy feature that allows it to work with multiple free proxy servers. The freeGPT API refuses some connections, especially when hosted in the cloud (Azure, AWS, Google Cloud). Auto proxy solves this problem automatically for you. When enabled, the application will automatically fetch and test proxy servers, updating the list of working proxies every 30 minutes.

Enable Auto Proxy

To enable it, just go to the config.json file and change the value of the "use_auto_proxy" to true.

"use_auto_proxy": true

use-auto-proxy-gif

Docker 🐳

Prerequisites

Before you start, make sure you have installed Docker on your machine.

Running the Docker

Pull the Docker image from Docker Hub:

docker pull ramonvc/freegpt-webui

Run the application using Docker:

docker run -p 1338:1338 ramonvc/freegpt-webui

Access the application in your browser using the URL:

http://127.0.0.1:1338

or

http://localhost:1338

When you're done using the application, stop the Docker containers using the following command:

docker stop <container-id>

Incorporated Projects πŸ‘₯

I highly recommend visiting and supporting both projects.

WebUI

The application interface was incorporated from the chatgpt-clone repository.

API G4F

The free GPT-4 API was incorporated from the GPT4Free repository.


Legal Notice

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.

Please note the following:

  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.

  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.

  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.

  4. Copyright: All content in this repository, including but not limited to code, images, and documentation, is the intellectual property of the repository author, unless otherwise stated. Unauthorized copying, distribution, or use of any content in this repository is strictly prohibited without the express written consent of the repository author.

  5. 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.

  6. 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.

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.

freegpt's People

Contributors

chatteach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

freegpt's Issues

Integration on Discord Bot

Hi there.

How can I give prompts to this gpt from a discord bot?. For example the discord user will ping my bot giving it a prompt and then the prompt should be sent on the FreeGPT.

Thanks in advance

api keys

Is there any way I can get a free api key or construct one with this project?

μ‹€ν–‰ μ•ˆλ˜λŠ”λΆ„λ“€ 해결법

run.py
PATH = os.path.dirname(os.path.realpath(file)).replace(os.sep, "/")
config = load(open(f'{PATH}/config.json', 'r'))

babel.py
def get_languages_from_dir(directory):
"""Return a list of directory names in the given directory."""

PATH = os.path.dirname(os.path.realpath(__file__)).replace(os.sep, "/").replace("freegpt-webui-v2/server", "freegpt-webui-v2")
directory = f"{PATH}/{directory}"

return [name for name in os.listdir(directory)
        if os.path.isdir(os.path.join(directory, name))]

BABEL_DEFAULT_LOCALE = 'ko_KR'
BABEL_LANGUAGES = [BABEL_DEFAULT_LOCALE]

good

Is this me doing something wrong or it?

i got this "Traceback (most recent call last):
File "C:\Users\acer\Downloads\freegpt-webui-v2\run.py", line 5, in
from server.backend import Backend_Api
File "C:\Users\acer\Downloads\freegpt-webui-v2\server\backend.py", line 7, in
import g4f
File "C:\Users\acer\Downloads\freegpt-webui-v2\g4f_init_.py", line 6, in
from .models import Model, ModelUtils, all_models
File "C:\Users\acer\Downloads\freegpt-webui-v2\g4f\models.py", line 3, in
from .Provider import RetryProvider, ProviderType
File "C:\Users\acer\Downloads\freegpt-webui-v2\g4f\Provider_init
.py", line 7, in
from .deprecated import *
File "C:\Users\acer\Downloads\freegpt-webui-v2\g4f\Provider\deprecated_init_.py", line 6, in
from .GetGpt import GetGpt
File "C:\Users\acer\Downloads\freegpt-webui-v2\g4f\Provider\deprecated\GetGpt.py", line 9, in
from Crypto.Cipher import AES
File "C:\Users\acer\AppData\Local\Programs\Python\Python311\Lib\site-packages\Crypto\Cipher_init_.py", line 82, in
from Crypto.Cipher._mode_ctr import _create_ctr_cipher
File "C:\Users\acer\AppData\Local\Programs\Python\Python311\Lib\site-packages\Crypto\Cipher_mode_ctr.py", line 35, in
from Crypto.Util.number import long_to_bytes
File "C:\Users\acer\AppData\Local\Programs\Python\Python311\Lib\site-packages\Crypto\Util\number.py", line 398
s = pack('>I', n & 0xffffffffL) + s
^
SyntaxError: invalid hexadecimal literal"

Installation Issue (Python-3.12.1) - MAC

studio@Subramanyam freegpt-webui % python3
Python 3.12.1 (main, Dec 9 2023, 08:07:48) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

quit()

studio@Subramanyam freegpt-webui % which python3
/opt/local/bin/python3
studio@Subramanyam freegpt-webui % pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting websocket-client
Using cached websocket_client-1.8.0-py3-none-any.whl (58 kB)
Collecting requests
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting tls-client
Using cached tls_client-1.0.1-py3-none-any.whl (41.3 MB)
Collecting pypasser
Using cached PyPasser-0.0.5.tar.gz (10 kB)
Collecting names
Using cached names-0.3.0.tar.gz (789 kB)
Collecting colorama
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting curl_cffi
Using cached curl_cffi-0.6.4-cp38-abi3-macosx_10_9_x86_64.whl (4.7 MB)
Collecting aiohttp
Using cached aiohttp-3.9.5-cp39-cp39-macosx_10_9_x86_64.whl (401 kB)
Collecting flask
Using cached flask-3.0.3-py3-none-any.whl (101 kB)
Collecting flask_cors
Using cached Flask_Cors-4.0.1-py2.py3-none-any.whl (14 kB)
Collecting flask-babel
Using cached flask_babel-4.0.0-py3-none-any.whl (9.6 kB)
Collecting streamlit
Using cached streamlit-1.35.0-py2.py3-none-any.whl (8.6 MB)
Collecting selenium
Using cached selenium-4.21.0-py3-none-any.whl (9.5 MB)
Collecting fake-useragent
Using cached fake_useragent-1.5.1-py3-none-any.whl (17 kB)
Collecting twocaptcha
Using cached TwoCaptcha-0.0.1.tar.gz (2.9 kB)
Collecting pydantic
Using cached pydantic-2.7.4-py3-none-any.whl (409 kB)
Collecting pymailtm
Using cached pymailtm-1.1.1-py3-none-any.whl (19 kB)
Collecting Levenshtein
Using cached Levenshtein-0.25.1-cp39-cp39-macosx_10_9_x86_64.whl (135 kB)
Collecting retrying
Using cached retrying-1.3.4-py3-none-any.whl (11 kB)
ERROR: Could not find a version that satisfies the requirement mailgw_temporary_email (from versions: none)
ERROR: No matching distribution found for mailgw_temporary_email
WARNING: You are using pip version 21.2.4; however, version 24.0 is available.
You should consider upgrading via the '/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip' command.
studio@Subramanyam freegpt-webui %

No answer to my question

GPT Response like:
{"_action":"_ask","error":"an error occurred list index out of range","success":false}
WX20230825-171737
Uploading WX20230825-171758.png…

err

{"_action":"_ask","error":"an error occurred list index out of range","success":false}

Error

{"_action":"_ask","error":"an error occurred Expecting value: line 1 column 1 (char 0)","success":false}

Support for models

I'm curious if this support gpt 4-1106-preview (gpt 4 turbo) and possibly later models.

Problem when hosting in Render

I hosted this repo in render.com
The deploy is succeeded
Website also working but it is not responding
The screenshots are attached herewith
Screenshot_2023-08-20-22-00-22-229
Screenshot_2023-08-20-22-00-36-173
Please help me to fix it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.