代码拉取完成,页面将自动刷新
Follow these steps to install G4F from the source code:
git clone https://github.com/xtekky/gpt4free.git
cd gpt4free
It's recommended to isolate your project dependencies. You can follow the Python official documentation for virtual environments.
python3 -m venv venv
.\venv\Scripts\activate
source venv/bin/activate
Install the minimum required packages:
pip install -r requirements-min.txt
requirements.txt
:If you prefer, you can install all packages listed in requirements.txt
:
pip install -r requirements.txt
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。