mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-11 16:55:41 +03:00
1.2 KiB
1.2 KiB
G4F - Installation Guide
Follow these steps to install G4F from the source code:
- Clone the Repository:
git clone https://github.com/xtekky/gpt4free.git
- Navigate to the Project Directory:
cd gpt4free
- (Optional) Create a Python Virtual Environment:
It's recommended to isolate your project dependencies. You can follow the Python official documentation for virtual environments.
python3 -m venv venv
- Activate the Virtual Environment:
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- Install Minimum Requirements:
Install the minimum required packages:
pip install -r requirements-min.txt
- Or Install All Packages from
requirements.txt
:
If you prefer, you can install all packages listed in requirements.txt
:
pip install -r requirements.txt
- Start Using the Repository:
You can now create Python scripts and utilize the G4F functionalities. Here's a basic example:
Create a test.py
file in the root folder and start using the repository:
import g4f
# Your code here