Code Monkey home page Code Monkey logo

babyagi's Introduction

babyagi-langchain

Introduction

This Python script is implementation of BabyAGI and LangChain's BabyAGI with Tools. This leverages FAISS for vector database and SerperAPI for easy searching engine scraping. This code base is inspired by BabyAGI and LangChain see Acknowledgements section below.

Warning

This script is designed to be run continuously as part of a task management system. Running this script continuously can result in high API usage, so please use it responsibly. Additionally, the script requires the OpenAI and SerpAPI APIs to be set up correctly, so make sure you have set up the APIs before running the script.

How to Use

Pre-requisite

You need OpenAI and SerpAPI API key for the LLM and Search feature.

To use the script, you will need to follow these steps:

  1. Clone the repository via git clone https://github.com/realminchoi/babyagi-langchain.git and cd into the cloned repository.
  2. Install the required packages: pip install -r requirements.txt
  3. Copy the .env.example file to .env: cp .env.example .env. This is where you will set the following variables.
  4. Set your OpenAI and SerperAPI API keys in the OPENAI_API_KEY, and SERPAPI_API_KEY variables.
  5. Set additional variables such as MAX_ITERATIONS, OBJECTIVE, FIRST_TASK

Usage

Run BabyAGI.

python babyagi.py 

Running in a container

To run the script inside a docker container:

docker-compose run babyagi

Acknowledgments

I would like to express my gratitude to the developers whose code I referenced in creating this repo.

Special thanks go to

@yoheinakajima (https://github.com/yoheinakajima/babyagi)

@hinthornw (langchain-ai/langchain#2559)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.