Seed, Code, Harvest: Grow Your Own App with Tree of Thoughts!
Welcome to The Compiler, a novel child project under the Tree of Thoughts (ToT) paradigm. Implementation here This project is crafted with the intent of making autonomous programming not just a reality, but an effortless task for you.
In essence, The Compiler allows you to "grow" any program you can dream of. By providing a high-level specification of the product you would like, you can sit back and let The Compiler do the heavy lifting.
The Compiler is brought to you by Agora, we're an community of creators united under the banner of Humanity. We utilize AI research as a means to solve Humanity's biggest obstacles like food production, planetary security, disease, and death
The Compiler leverages the ToT framework and large language models (LLMs) to handle the programming process, from abstract specifications to a working program.
Here's a basic breakdown of the workflow:
- Input: You provide an abstract specification for the product you would like.
- Unit Tests Generation: We use an LLM on ToT to produce a suite of unit tests for the code.
- Run ToT: We run the Tree of Thoughts LLM on the given specification, using the generated unit tests as the evaluation score.
- Output: Ready to use program!
Get started with the beta:
git clone https://github.com/kyegomez/the-compiler.git
git clone https://github.com/kyegomez/tree-of-thoughts.git
pip install tree-of-thoughts
pip install transformers
pip install langchain
cp tree-of-thoughts/experiements/ -r ~.local/lib/python3.10/site-packages/
echo "export OPENAI_API_KEY=<yourapikey>" >> ~/.bashrc
echo "export OPENAI_API_BASE=https://api.openai.com/v1/" >> ~/.bashrc
source ~/.bashrc
python3 test.py
The Compiler, leveraging the Tree of Thoughts paradigm, consists of several primary components, including the Specification Parser, Thought Decomposer, Thought Generator, State Evaluator, and the Search Algorithm.
-
Specification Parser: This interprets your high-level input specifications and translates them into a format that the Thought Decomposer can understand and work with.
-
Thought Decomposer: This component breaks down the programming problem into manageable "thoughts" or steps.
-
Thought Generator: It generates potential thoughts or steps from the current state using two strategies, either sampling thoughts independently or proposing thoughts sequentially.
-
State Evaluator: It evaluates the progress of different states towards solving the programming problem, acting as a heuristic for the Search Algorithm.
-
Search Algorithm: This module determines which states to keep exploring and in which order. It employs either Breadth-First Search (BFS) or Depth-First Search (DFS), depending on the nature of the problem.
-
Integrate langchaina autogpt agent Tree of Thoughts class
-
Provide objectives to worker nodes
-
Provide access to terminal and other tools
If you find this project exciting and think others might benefit from it, feel free to share it. Use the buttons below to share it on various social media platforms:
Let's revolutionize the world of programming together with The Compiler!