Coder Social home page Coder Social logo

ukiuki201277777 / createtool-agi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fuyu-quant/createtool-agi

0.0 0.0 0.0 2.57 MB

CreateTool-AGI is an experimental open-sorce extension of LLM that allows you to create your own Tools and automatically extend their capabilities.

License: MIT License

Shell 2.66% Python 97.34%

createtool-agi's Introduction

CreateTool-AGI

What is CreateTool-AGI?

 This Python script is designed to enhance the capabilities of the Large Language Model (LLM) by utilizing LangChain's Tools feature: CreateTool-AGI automatically generates Tools for each input question and uses them to answer the question. This feature allows users to solve problems that are difficult to solve with LLM alone, but can be written in a program. Another important feature of this system is that it can output the Python scripts used to derive the answers, so that the correctness of the logic can be verified. In addition, once created, the Python script is immediately available as a Tool and can be used to solve problems with similar inputs.

 CreateTool-AGI creates new Tools each time a new question is entered, allowing it to improve its capabilities autonomously.

createtoolagigif

How It Works

This script is executed in the following order:

  1. Generalization of input problems
  2. Determine if the solution can be solved with the available Tools.
  3. Creation of Tools.
  4. Output answers to questions using the created Tools.

createtoolagi

How to Use

Use the link below to try it out immediately on Google colab.

Open In Colab

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

  1. Get OpenAI's API key

  2. Pip install with the following command

pip install git+https://github.com/fuyu-quant/CreateTool-AGI.git
  1. Install required libraries
pip install langchain==0.0.167
pip install openai==0.27.4
  1. You can execute the program as follows.
from createtoolagi import CreateToolAGI

input = 'What is the sum of the prime numbers from 1 to 10000?'
tools = []
ctagi = CreateToolAGI()

ctagi.run(input, tools)

output

> Generalize the input task.
Generalized Task:What is the sum of the prime numbers from A to B?

> Determine if you should make a tool.
I must create the tool before executing.

try:1
> Create a tool.
Completed!
Created tool name:PrimeSumTool



> Entering new AgentExecutor chain...
I need to find the sum of prime numbers between 1 and 100000.
Action: PrimeSumTool
Action Input: 1,100000
Observation: 454396537
Thought:I now know the final answer.
Final Answer: 454396537

> Finished chain.

While we were able to confirm that the above run would also yield an answer on GPT-4, we believe that CreateToolAGI has an advantage because it can handle any numerical input.

Supported Models

Currently, the recommended model is GPT-4; GPT-3.5-turbo often does not run well

Contributor

Backstory

This idea is based on langchain-tools, which was created in an attempt to make LLM learn LightGBM.

createtool-agi's People

Contributors

fuyu-quant avatar

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.