Coder Social home page Coder Social logo

van064886 / free-gpt4-web-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aledipa/free-gpt4-web-api

0.0 0.0 0.0 705 KB

FreeGPT4-WEB-API is a python server that allows you to have a self-hosted GPT-4 Unlimited and Free WEB API, via the latest Bing's AI.

Home Page: http://144.91.83.35:5500/?text=Your Request Here

License: GNU General Public License v3.0

Python 98.12% Dockerfile 1.88%

free-gpt4-web-api's Introduction

Free-GPT4-WEB-API

FreeGPT4-WEB-API is a python server that allows you to have a self-hosted GPT-4 Unlimited and Free WEB API, via the latest Bing's AI.

Requirements

  • Python 3
  • Flask
  • cookies.json (see this guide for its creation), this file is mandatory for the script to function.

Manual Installation

To install the required libraries, you can use the following command:

pip3 install Flask

Usage

To run the server, use the following command:

python3 FreeGPT4_Server.py --cookie-file /path/to/your/cookies.json

Docker Installation

It's possible to install the docker image of this API by running this command:

docker container run -v /path/to/your/cookies.json:/cookies.json:ro -p YOUR_PORT:5500 d0ckmg/free-gpt4-web-api

or alternatively, you can use a docker-compose file:

docker-compose.yml

version: "3.9"
services:
  api:
    image: "d0ckmg/free-gpt4-web-api:latest"
    ports:
      - "YOUR_PORT:5500"
    volumes:
      - /path/to/your/cookies.json:/cookies.json:ro

This will start the server and allow you to access the GPT-4 WEB API.

Once the server is running, you can access the API by sending HTTP requests to the server's address. The data for the requests should be sent via hotlinking and the response will be returned as plain text.

For example, to generate text using the API, you can send a GET request with the text parameter set to the text you want to use as a prompt and the (optional) style parameter set to the style you want to use. The default style is "balanced" and is recommended since it is faster. The generated text will be returned in the response as plain text.

To stop the server, you can press CTRL+C in the terminal where the server is running.

Siri Integration

You can implement the power of GPT4 in Siri by using the GPTMode Apple Shortcut. Then you can use it just by saying "GPT Mode" to Siri and then ask your question when prompted to do so.

Configuration

The server can be configured by editing the FreeGPT4_Server.py file. You can change the server's port, host, and other settings.

Libraries

FreeGPT4-WEB-API uses the Flask and EdgeGPT libraries. Flask is a micro web framework for Python that allows you to easily create web applications. EdgeGPT is a library that provides an interface to the Bing's GPT-4, credits to A. Cheong's EdgeGPT.

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.