BabyAGI is a Python script used as an example for a task management system using the OpenAI and Pinecone APIs. The objective of this system is to create tasks based on the results of previous tasks and a predefined goal, using the natural language processing (NLP) capabilities of OpenAI.
Operation
The script works by executing an infinite loop that performs the following steps:
- Retrieves the first task from the task list.
- Sends the task to the runtime agent, which uses the OpenAI API to perform it according to the context.
- Enriches the result and stores it in Pinecone.
- Creates new tasks and reorganizes the task list according to the goal and result of the previous task.
Usage
To use the script, follow these steps:
- Clone the repository and navigate to the cloned directory.
- Install the required packages.
- Copy the .env.example file to .env and set the necessary variables, including the OpenAI and Pinecone API keys.
- (Optional) Set the goal and the first task for the system.
- Run the script.
Supported templates
The script works with all OpenAI templates, as well as with Llama via Llama.cpp. The default template is gpt-3.5-turbo.
Warning
This script is designed to be run continuously as part of a task management system. Continuous use can result in high API consumption, so use it responsibly. Also make sure you have properly configured the OpenAI and Pinecone APIs before running the script.
Contribute
BabyAGI is still in its infancy and its direction is still being defined. Contributions are welcome, but we ask that you focus on small, modular changes and provide a detailed description of the features being introduced.