Top Related Projects
Examples and guides for using the OpenAI API
Integrate cutting-edge LLM technology quickly and easily into your apps
🦜🔗 Build context-aware reasoning applications
JARVIS, a system to connect LLMs with ML community. Paper: https://arxiv.org/pdf/2303.17580.pdf
Quick Overview
GPT-Pilot is an AI-powered development tool that aims to autonomously create entire apps from scratch based on user prompts. It leverages large language models to generate, execute, and debug code, potentially revolutionizing the software development process by automating many aspects of coding and project management.
Pros
- Automates significant portions of the software development lifecycle
- Can potentially reduce development time and costs
- Adapts to user feedback and iterates on the codebase
- Handles various aspects of development, including architecture, coding, and testing
Cons
- May not fully replace human developers, especially for complex or specialized projects
- Depends heavily on the quality and capabilities of the underlying language models
- Potential for generating code with security vulnerabilities or inefficiencies
- Learning curve for effectively prompting and guiding the AI
Getting Started
To get started with GPT-Pilot, follow these steps:
-
Clone the repository:
git clone https://github.com/Pythagora-io/gpt-pilot.git
-
Install dependencies:
cd gpt-pilot pip install -r requirements.txt
-
Set up your OpenAI API key:
export OPENAI_API_KEY='your-api-key-here'
-
Run the main script:
python main.py
-
Follow the prompts to describe your project and let GPT-Pilot generate your application.
Note: GPT-Pilot is an experimental tool and should be used with caution in production environments. Always review and test the generated code thoroughly before deployment.
Competitor Comparisons
Examples and guides for using the OpenAI API
Pros of openai-cookbook
- Comprehensive collection of examples and best practices for using OpenAI's APIs
- Regularly updated with new features and techniques
- Maintained by OpenAI, ensuring accuracy and alignment with their services
Cons of openai-cookbook
- Focused solely on OpenAI's offerings, limiting its scope for general AI development
- Less emphasis on end-to-end project development compared to gpt-pilot
- May require more manual integration into existing projects
Code Comparison
gpt-pilot:
def generate_code(prompt, language):
# AI-driven code generation based on prompt and language
return ai_generated_code
openai-cookbook:
import openai
response = openai.Completion.create(
engine="davinci-codex",
prompt="Write a Python function to calculate factorial",
max_tokens=100
)
The gpt-pilot example showcases a higher-level abstraction for code generation, while the openai-cookbook example demonstrates direct API usage for a specific task. gpt-pilot aims to provide a more comprehensive development experience, whereas openai-cookbook focuses on illustrating various API functionalities.
Integrate cutting-edge LLM technology quickly and easily into your apps
Pros of semantic-kernel
- More comprehensive framework for integrating AI capabilities into applications
- Better documentation and examples for developers
- Stronger support and backing from Microsoft
Cons of semantic-kernel
- Steeper learning curve due to more complex architecture
- Less focused on autonomous code generation compared to gpt-pilot
Code Comparison
semantic-kernel:
var kernel = Kernel.Builder.Build();
var skill = kernel.ImportSkill(new TextSkill());
var result = await kernel.RunAsync("Hello world!", skill["Uppercase"]);
gpt-pilot:
from gpt_pilot.core import GPTPilot
pilot = GPTPilot()
result = pilot.generate_code("Create a function to print 'Hello, World!'")
Summary
semantic-kernel offers a more robust framework for AI integration with better documentation and support, while gpt-pilot focuses on autonomous code generation. semantic-kernel has a steeper learning curve but provides more flexibility for complex applications. gpt-pilot is simpler to use for quick code generation tasks but may have limitations for more advanced use cases.
🦜🔗 Build context-aware reasoning applications
Pros of langchain
- More comprehensive framework for building LLM-powered applications
- Larger community and ecosystem with extensive documentation
- Supports multiple LLM providers and integrations
Cons of langchain
- Steeper learning curve due to its extensive features
- Can be overkill for simpler projects
- Less focused on autonomous code generation
Code Comparison
langchain example:
from langchain import OpenAI, LLMChain, PromptTemplate
template = "What is a good name for a company that makes {product}?"
prompt = PromptTemplate(template=template, input_variables=["product"])
llm_chain = LLMChain(prompt=prompt, llm=OpenAI(temperature=0))
response = llm_chain.run("colorful socks")
print(response)
gpt-pilot example:
from gpt_pilot.core import GPTPilot
pilot = GPTPilot()
project = pilot.create_project("My Web App")
pilot.generate_code(project)
While langchain provides a flexible framework for various LLM tasks, gpt-pilot focuses on autonomous code generation. langchain offers more control over the LLM interaction, whereas gpt-pilot aims for a more automated development experience.
Pros of TaskMatrix
- Focuses on multimodal AI tasks, integrating vision and language models
- Provides a flexible framework for combining different AI capabilities
- Designed for research and experimentation in AI task composition
Cons of TaskMatrix
- Less focused on end-to-end software development automation
- May require more manual configuration and integration for specific tasks
- Documentation and examples are more limited compared to gpt-pilot
Code Comparison
TaskMatrix:
from taskmatrix import TaskMatrix
tm = TaskMatrix()
result = tm.run_task("Describe the image and suggest improvements", image_path="example.jpg")
print(result)
gpt-pilot:
from gpt_pilot import GPTPilot
pilot = GPTPilot()
project = pilot.create_project("My Web App")
pilot.develop(project)
TaskMatrix is designed for flexible AI task composition, particularly in multimodal scenarios, while gpt-pilot focuses on automating software development processes. TaskMatrix may be more suitable for researchers and AI enthusiasts exploring various AI capabilities, whereas gpt-pilot is geared towards developers looking to streamline their coding workflow.
JARVIS, a system to connect LLMs with ML community. Paper: https://arxiv.org/pdf/2303.17580.pdf
Pros of JARVIS
- Focuses on multimodal AI agents capable of vision, language, and action
- Designed for embodied AI tasks in 3D environments
- Supports a wider range of AI models and architectures
Cons of JARVIS
- More complex setup and configuration required
- Less focused on practical software development tasks
- Steeper learning curve for non-AI specialists
Code Comparison
JARVIS (Python):
from jarvis.agents import Agent
from jarvis.environments import Environment
agent = Agent(model="gpt-4")
env = Environment("3d_room")
action = agent.act(env.observe())
gpt-pilot (Python):
from gpt_pilot import GPTPilot
pilot = GPTPilot()
project = pilot.create_project("web_app")
code = project.generate_code()
Summary
JARVIS is a comprehensive framework for multimodal AI agents, excelling in embodied AI tasks and 3D environments. It offers greater flexibility in model choice but requires more setup and AI expertise. gpt-pilot, on the other hand, is tailored for software development, providing a more streamlined experience for generating code and building applications, albeit with a narrower focus on development tasks.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ð§ââï¸ GPT PILOT ð§ââï¸
GPT Pilot doesn't just generate code, it builds apps!
ð« If you would like to get updates on future releases or just get in touch, join our Discord server or you can add your email here. ð¬
- ð Requirements
- ð¦How to start using gpt-pilot?
- ð Examples
- ð³ How to start gpt-pilot in docker?
- ð§âð»ï¸ CLI arguments
- ð How GPT Pilot works?
- ð´How's GPT Pilot different from Smol developer and GPT engineer?
- ð» Contributing
- ð Connect with us
- ð Star history
GPT Pilot aims to research how much LLMs can be utilized to generate fully working, production-ready apps while the developer oversees the implementation.
The main idea is that AI can write most of the code for an app (maybe 95%), but for the rest, 5%, a developer is and will be needed until we get full AGI.
If you are interested in our learnings during this project, you can check our latest blog posts.
ð Requirements
- Python 3.9+
ð¦How to start using gpt-pilot?
If you're new to GPT Pilot:
After you have Python and (optionally) PostgreSQL installed, follow these steps:
git clone https://github.com/Pythagora-io/gpt-pilot.git
(clone the repo)cd gpt-pilot
(go to the repo folder)python3 -m venv venv
(create a virtual environment)source venv/bin/activate
(or on Windowsvenv\Scripts\activate
) (activate the virtual environment)pip install -r requirements.txt
(install the dependencies)cp example-config.json config.json
(createconfig.json
file)- Set your key and other settings in
config.json
file:- LLM Provider (
openai
,anthropic
orgroq
) key and endpoints (leavenull
for default) (note that Azure and OpenRouter are suppored via theopenai
setting) - Your API key (if
null
, will be read from the environment variables) - database settings: sqlite is used by default, PostgreSQL should also work
- optionally update
fs.ignore_paths
and add files or folders which shouldn't be tracked by GPT Pilot in workspace, useful to ignore folders created by compilers
- LLM Provider (
python main.py
(start GPT Pilot)
All generated code will be stored in the folder workspace
inside the folder named after the app name you enter upon starting the pilot.
If you're upgrading from GPT Pilot v0.1
Assuming you already have the git repository with an earlier version:
git pull
(update the repo)source pilot-env/bin/activate
(or on Windowspilot-env\Scripts\activate
) (activate the virtual environment)pip install -r requirements.txt
(install the new dependencies)python main.py --import-v0 pilot/gpt-pilot
(this should import your settings and existing projects)
This will create a new database pythagora.db
and import all apps from the old database. For each app,
it will import the start of the latest task you were working on.
To verify that the import was successful, you can run python main.py --list
to see all the apps you have created,
and check config.json
to check the settings were correctly converted to the new config file format (and make
any adjustments if needed).
ð Examples
Click here to see all example apps created with GPT Pilot.
ð³ How to start gpt-pilot in docker?
git clone https://github.com/Pythagora-io/gpt-pilot.git
(clone the repo)- Update the
docker-compose.yml
environment variables, which can be done viadocker compose config
. If you wish to use a local model, please go to https://localai.io/basics/getting_started/. - By default, GPT Pilot will read & write to
~/gpt-pilot-workspace
on your machine, you can also edit this indocker-compose.yml
- run
docker compose build
. this will build a gpt-pilot container for you. - run
docker compose up
. - access the web terminal on
port 7681
python main.py
(start GPT Pilot)
This will start two containers, one being a new image built by the Dockerfile
and a Postgres database. The new image also has ttyd installed so that you can easily interact with gpt-pilot. Node is also installed on the image and port 3000 is exposed.
PostgreSQL support
GPT Pilot uses built-in SQLite database by default. If you want to use the PostgreSQL database, you need to additional install asyncpg
and psycopg2
packages:
pip install asyncpg psycopg2
Then, you need to update the config.json
file to set db.url
to postgresql+asyncpg://<user>:<password>@<db-host>/<db-name>
.
ð§âð»ï¸ CLI arguments
List created projects (apps)
python main.py --list
Note: for each project (app), this also lists "branches". Currently we only support having one branch (called "main"), and in the future we plan to add support for multiple project branches.
Load and continue from the latest step in a project (app)
python main.py --project <app_id>
Load and continue from a specific step in a project (app)
python main.py --project <app_id> --step <step>
Warning: this will delete all progress after the specified step!
Delete project (app)
python main.py --delete <app_id>
Delete project with the specified app_id
. Warning: this cannot be undone!
Import projects from v0.1
python main.py --import-v0 <path>
This will import projects from the old GPT Pilot v0.1 database. The path should be the path to the old GPT Pilot v0.1 database. For each project, it will import the start of the latest task you were working on. If the project was already imported, the import procedure will skip it (won't overwrite the project in the database).
Other command-line options
There are several other command-line options that mostly support calling GPT Pilot from our VSCode extension. To see all the available options, use the --help
flag:
python main.py --help
ð How GPT Pilot works?
Here are the steps GPT Pilot takes to create an app:
- You enter the app name and the description.
- Product Owner agent like in real life, does nothing. :)
- Specification Writer agent asks a couple of questions to understand the requirements better if project description is not good enough.
- Architect agent writes up technologies that will be used for the app and checks if all technologies are installed on the machine and installs them if not.
- Tech Lead agent writes up development tasks that the Developer must implement.
- Developer agent takes each task and writes up what needs to be done to implement it. The description is in human-readable form.
- Code Monkey agent takes the Developer's description and the existing file and implements the changes.
- Reviewer agent reviews every step of the task and if something is done wrong Reviewer sends it back to Code Monkey.
- Troubleshooter agent helps you to give good feedback to GPT Pilot when something is wrong.
- Debugger agent hate to see him, but he is your best friend when things go south.
- Technical Writer agent writes documentation for the project.
ð´How's GPT Pilot different from Smol developer and GPT engineer?
- GPT Pilot works with the developer to create a fully working production-ready app - I don't think AI can (at least in the near future) create apps without a developer being involved. So, GPT Pilot codes the app step by step just like a developer would in real life. This way, it can debug issues as they arise throughout the development process. If it gets stuck, you, the developer in charge, can review the code and fix the issue. Other similar tools give you the entire codebase at once - this way, bugs are much harder to fix for AI and for you as a developer.
- Works at scale - GPT Pilot isn't meant to create simple apps but rather so it can work at any scale. It has mechanisms that filter out the code, so in each LLM conversation, it doesn't need to store the entire codebase in context, but it shows the LLM only the relevant code for the current task it's working on. Once an app is finished, you can continue working on it by writing instructions on what feature you want to add.
ð» Contributing
If you are interested in contributing to GPT Pilot, join our Discord server, check out open GitHub issues, and see if anything interests you. We would be happy to get help in resolving any of those. The best place to start is by reviewing blog posts mentioned above to understand how the architecture works before diving into the codebase.
ð¥ Development
Other than the research, GPT Pilot needs to be debugged to work in different scenarios. For example, we realized that the quality of the code generated is very sensitive to the size of the development task. When the task is too broad, the code has too many bugs that are hard to fix, but when the development task is too narrow, GPT also seems to struggle in getting the task implemented into the existing code.
ð Telemetry
To improve GPT Pilot, we are tracking some events from which you can opt out at any time. You can read more about it here.
ð Connect with us
ð As an open-source tool, it would mean the world to us if you starred the GPT-pilot repo ð
ð¬ Join the Discord server to get in touch.
Top Related Projects
Examples and guides for using the OpenAI API
Integrate cutting-edge LLM technology quickly and easily into your apps
🦜🔗 Build context-aware reasoning applications
JARVIS, a system to connect LLMs with ML community. Paper: https://arxiv.org/pdf/2303.17580.pdf
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot