Skip to main content

gpt-pilot

代码生成器GPT Pilot

GPT Pilot 是一个使用python写的框架,可以编写代码,调试代码,当需要帮助时与你交谈等等。

快速开始

部署PostgreSQL

version: '3.1'

services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: example
ports:
- 5432:5432
volumes:
- ./data:/var/lib/postgresql/data

用户名:postgres

密码:example

host:host.docker.internal

CLI Tool安装

git clone https://github.com/Pythagora-io/gpt-pilot.git
cd gpt-pilot
python3 -m venv pilot-env
source pilot-env/bin/activate
pip install -r requirements.txt
cd pilot
mv .env.example .env

修改.env几个关键参数

# 初始化数据库
python db_init.py

# 启动
python main.py

创建项目名


? What is the project name? admin-portal


? Describe your app in as much detail as possible. 使用antd 创建一个admin后台


Is the admin-portal intended for web browser access or as a desktop application?

? Is the admin-portal intended for web browser access or as a desktop application? web browser access


Should the admin-portal support multiple user roles with different access permissions?

? Should the admin-portal support multiple user roles with different access permissions? yes


Will there be a need for any third-party service integrations within the admin-portal?

? Will there be a need for any third-party service integrations within the admin-portal? yes


What specific third-party services will the admin-portal need to integrate with?

? What specific third-party services will the admin-portal need to integrate with? facebook


What core features or modules should the admin-portal include?

? What core features or modules should the admin-portal include? 用户管理


Will the admin-portal require localization for multiple languages or will it use Chinese exclusively?

? Will the admin-portal require localization for multiple languages or will it use Chinese exclusively? 是的

Project Summary:

The project involves the creation of an admin-portal called "admin-portal" which will be accessible via web browsers. The admin-portal will be developed using antd (Ant Design). This application will support multiple user roles with varying access permissions. It will integrate with Facebook for certain functionalities. The core features will include user management. Additionally, the portal will require localization to support multiple languages alongside Chinese.

Planning project architecture...

```json
{
"technologies": [
"React",
"Ant Design (antd)",
"Node.js",
"Express.js",
"MongoDB",
"Mongoose",
"Passport.js",
"i18next",
"axios",
"React Router",
"HTML",
"CSS3",
"JavaScript",
"JWT (JSON Web Tokens)",
"Facebook SDK for JavaScript"
]
}

中英文回答都可以,然后会有技术栈列表,接下来会根据需求自动生成代码。

遇到bug会自动修正

image-20240111212313130

使用技巧

项目中断后,接着运行

python main.py app_id=4bea942c-21c3-4026-b0a9-ceb5f75c5d6f

或者

python main.py workspace=python-utils