Skip to content

Towards Automated General Intelligence.

License

Notifications You must be signed in to change notification settings

TouristShaun/lionagi

Repository files navigation

LionAGI

Towards Automated General Intelligence

LionAGI is a Python package that combines data manipulation with AI tools, aiming to simplify the integration of advanced machine learning tools, such as Large Language Models (i.e. OpenAI's GPT).

Install LionAGI with pip:

pip install lionagi

Download the .env_template file, input your OPENAI_API_KEY, save the file, rename as .env and put in your project's root directory.

Features

  • Efficient data operations for reading, chunking, binning, writing, storing and managing data.
  • Robust integration with LLM services like OpenAI with configurable rate limiting concurrent API calls for efficiency and maximum throughput.
  • Create a production ready LLM application in hours. Intuitive workflow management to streamline and expedite the process from idea to market.

Currently, LionAGI only natively support OpenAI API calls, support for other LLM providers as well as open source will be integrated in future releases.

Quick Start

The following simplified example demonstrates how to use LionAGI to perform a calculation by handling a workflow:

import lionagi as li

# define system messages, context and user instruction
system = "You are a helpful assistant designed to perform calculations."
instruction = {"Addition":"Add the two numbers together i.e. x+y"}
context = {"x": 10, "y": 5}

# Initialize a session with a system message
calculator = li.Session(system=system)

# run a LLM API call
result = await calculator.initiate(instruction=instruction,
                                   context=context,
                                   model="gpt-4-1106-preview")

print(f"Calculation Result: {result}")

Visit our notebooks for our examples.

Community

We encourage contributions to LionAGI and invite you to enrich its features and capabilities. Engage with us and other community members on Discord

Citation

When referencing LionAGI in your projects or research, please cite:

@software{Li_LionAGI_2023,
  author = {Haiyang Li},
  month = {12},
  year = {2023},
  title = {LionAGI: Towards Automated Intelligence},
  url = {https://github.com/lion-agi/lionagi},
}

Thank you for choosing LionAGI.

Requirements

Python 3.9 or higher.

About

Towards Automated General Intelligence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 71.1%
  • Python 28.9%