LLM Group Chat Framework: chat with multiple LLMs at the same time
Project description
Latest Progress 🎉
- [January 2024] Released version v0.0.1, officially open-sourced!
Introduction
What is OpenAOE?
AOE, an acronym from DOTA2 for Area of Effect, denotes an ability that can affect a group of targets within a certain area. Here, AOE in AI implies that user can obtain parallel outputs from multiple LLMs with one single prompt.
What problem does OpenAOE want to solve?
Currently, there are many open-source frameworks based on the ChatGPT for chat, but the open-sourced
single-prompt-multiple-LLM-responses framework is still not coming yet.
The emergence of AOE fills this gap: AOE can help large model algorithm researchers, evaluators, engineering developers, and even non-professionals to quickly access the market's well-known commercial and open-source large models, providing both single model serial response and multi-model parallel response modes.
What can you get from OpenAOE?
- Send a prompt once to one or more large language models and get their return.
- Provides access to commercial large model APIs, with default support for gpt3.5, gpt4, Google Palm, Minimax, Claude, Spark, etc., and also supports user-defined access to other large model APIs.
- Provides access to open-source large model APIs; users can use LMDeploy to deploy open-source large models with one click.
- We also provide backend APIs and a WEB side to meet the needs of different users.
Quick Run
We will provide three different ways to run open-aoe: run by pip, run by docker and run by source code as well.
Run by pip
[!TIP] Require python >= 3.9
Install
pip install -U open-aoe
Start
open-aoe -f /path/to/your/config-template.yaml
Run by docker
Install
There are two ways to get the OpenAOE docker image by:
- pull the open-aoe docker image
docker pull open-aoe:latest
- or build a docker image
git clone https://github.com/internlm/OpenAOE
cd open-aoe
docker build . -f docker/Dockerfile -t open-aoe:latest
Start
docker run -p 10099:10099 -v /path/to/your/config-template.yaml:/app/config-template.yaml --name OpenAOE open-aoe:latest
Run by source code
Install
- clone this project
git clone https://github.com/internlm/OpenAOE
- [optional] build the frontend project when the frontend codes are changed
cd open-aoe/openaoe/frontend
npm install
npm run build
Start
cd open-aoe/openaoe
pip install -r backend/requirements.txt
python -m main -f /path/to/your/config-template.yaml
[!TIP]
/path/to/your/config.yaml
is the configuration file read by OpenAOE at startup, containing the relevant configuration information for the large model, including: API URLs, AKSKs, Tokens, etc., which are required for the startup of OpenAOE. A template file can be found inopenaoe/backend/config/config.yaml
.
Tech Introduction
You are always welcome to fork this project and contribute your work
If you want to add more LLMs' APIs or features based on OpenAOE, the following info might be helpful.
Tech Stack
The technology stack we use includes:
- Backend framework based on python + fastapi;
- Frontend framework based on typescript + Sealion-Client (encapsulated based on React) + Sealion-UI.
- Build tools:
- conda: quickly create a virtual python env to install necessary packages
- npm: build the frontend project
[!TIP] The build tools can be installed by sealion-cli by
pip install -U sealion-cli
Organization of the Repo
- Frontend code in
openaoe/frontend
- Backend code in
openaoe/backend
- Project entry-point is
openaoe/main.py
How to add a new model
Frontend
- Add new model info like
name
,avatar
,provider
, etc inopenaoe/frontend/src/config/model-config.ts
- Add a new model basic API request payload configuration in
openaoe/frontend/src/config/api-config.ts
- Modify your new model's payload specifically in
openaoe/frontend/src/services/fetch.ts
, you may need to change the payload structure and handle corner cases according to your model's API definition.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.