Add your description here
Project description
Browser-gpt-api
Interact with ChatGPT via an API running on a local server using Selenium under the hood.
What is it?
A python tool to help you send prompts to ChatGPT webpage and get response via API calls. With Browser-GPT you can get infinite amount of API calls without worrying about any credits. This works by automating the process of sending a prompt to ChatGPT and getting the response back using Selenium.
How to Install & run:
This project uses Rye Package manager
-
Clone the repository:
git clone https://github.com/vertexcover-io/browser-gpt-api.git cd src/browser_gpt_api
-
Install project dependencies using Rye:
rye sync
-
Create a copy of the environment variable template file and edit it according to your configuration:
cp .env.template .env
-
Download Chrome Driver based on your chrome version and OS.
-
Add the location of
chromedriver.exe
file as aSystem variable
in Environmental variables. -
In the main directory run
setup.py
:python setup.py
-
To setup your local-server run
server.py
:python server.py
-
Now you can access ChatGPT via the API endpoint :
http://127.0.0.1:8000/chat/completion
Stack
- Rye
- Selenium
- FastAPI
- uvicorn
Pre-Commit
Set up pre-commit hooks to automatically check your code for linting and formatting issues before the commit. Run following command to install pre-commit hooks:
rye run pre-commit install
Format and Lint
This project uses Ruff for code formatting and linting. Use following commands to format and lint your code:
- Check for issues:
ruff check
- Format your code:
ruff format
For more information refer to the Ruff Documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file browser_gpt_api-0.1.0.tar.gz
.
File metadata
- Download URL: browser_gpt_api-0.1.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 742250d8085ba1ba60ccbdefd494edab1c26ab64fb39ffe46c4dec1f3ce210ed |
|
MD5 | fbc287f31280e37de11a384dbba922c5 |
|
BLAKE2b-256 | ab362640b1db79e2395950d4e97d64d61b1850d7fb3e37f512eef74409e3b060 |
File details
Details for the file browser_gpt_api-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: browser_gpt_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96bcfe28a9e236d3e334b2530548cc0a05d516e8d89500dd78956ba71eb0fa26 |
|
MD5 | 668e5a78454fa56bec2bcc16808454c6 |
|
BLAKE2b-256 | d30e8b4a8b5bce1f15d77778c4012503b8930b1c18814c13928eeedb16d97702 |