• Stars
    star
    355
  • Rank 119,764 (Top 3 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RestAI is an AIaaS (AI as a Service) open-source platform. Built on top of LlamaIndex, Ollama and HF Pipelines. Supports any public LLM supported by LlamaIndex and any local LLM suported by Ollama. Precise embeddings usage and tuning.


RestAI

AIaaS (AI as a Service) for everyone. Create agents (projects) and consume them using a simple REST API.

Demo: https://ai.ince.pt Username: demo Password: demo

Features

  • Projects: There are multiple types of agents (projects), each with its own features. (rag, ragsql, inference, vision, router)
  • Users: A user represents a user of the system. It's used for authentication and authorization (basic auth). Each user may have access to multiple projects.
  • LLMs: Supports any public LLM supported by LlamaIndex or any local LLM suported by Ollama.
  • VRAM: Automatic VRAM management. RestAI will manage the VRAM usage, automatically loading and unloading models as needed and requested.
  • API: The API is a first-class citizen of RestAI. All endpoints are documented using Swagger.
  • Frontend: There is a frontend available at restai-frontend

Project Types

RAG

  • Embeddings: You may use any embeddings model supported by llamaindex. Check embeddings definition.
  • Vectorstore: There are two vectorstores supported: Chroma and Redis
  • Retrieval: It features an embeddings search and score evaluator, which allows you to evaluate the quality of your embeddings and simulate the RAG process before the LLM. Reranking is also supported, ColBERT and LLM based.
  • Loaders: You may use any loader supported by llamaindex.
  • Sandboxed mode: RAG agents (projects) have "sandboxed" mode, which means that a locked default answer will be given when there aren't embeddings for the provided question. This is useful for chatbots, where you want to provide a default answer when the LLM doesn't know how to answer the question, reduncing hallucination.
  • Evaluation: You may evaluate your RAG agent using deepeval. Using the eval property in the RAG endpoint.

RAGSQL

  • Connection: Supply a MySQL or PostgreSQL connection string and it will automatically crawl the DB schema, using table and column names it’s able to figure out how to translate the question to sql and then write a response.

Inference

Vision

  • text2img: RestAI supports local Stable Diffusion and Dall-E. It features prompt boosting, a LLM is internally used to boost the user prompt with more detail.
  • img2text: RestAI supports LLaVA, BakLLaVA by default.
  • img2img: RestAI supports InstantID and Qwen-VL default.

Stable Diffusion & InstantID

LLaVA

Router

  • Routes: Very similar to Zero Shot React strategy, but each route is a project. The router will route the question to the project that has the highest score. It's useful when you have multiple projects and you want to route the question to the most suitable one.

LLMs

  • You may use any LLM supported by Ollama and/or LlamaIndex.

Installation

  • RestAI uses Poetry to manage dependencies. Install it with pip install poetry.

Development

  • make install
  • make dev (starts restai in development mode)
  • make devfrontend (starts restai's frontend in development mode)

Production

  • make install
  • make prod

API

  • Endpoints: All the API endpoints are documented and available at: Swagger

Frontend

Tests

  • Tests are implemented using pytest. Run them with make test.

License

Pedro Dias - @pedromdias

Licensed under the Apache license, version 2.0 (the "license"); You may not use this file except in compliance with the license. You may obtain a copy of the license at:

http://www.apache.org/licenses/LICENSE-2.0.html

Unless required by applicable law or agreed to in writing, software distributed under the license is distributed on an "as is" basis, without warranties or conditions of any kind, either express or implied. See the license for the specific language governing permissions and limitations under the license.

More Repositories

1

dockerode

Docker + Node = Dockerode (Node.js module for Docker's Remote API)
JavaScript
4,339
star
2

docker-modem

Docker Remote API network stack driver.
JavaScript
230
star
3

dockerode-compose

docker-compose in Node.js using dockerode
JavaScript
141
star
4

node-whmcs

WHMCS's API Node.js client
JavaScript
87
star
5

firecrackerode

Firecracker + Node = Firecrackerode (Node.js module for Amazon's Firecracker MicroVM platform)
JavaScript
23
star
6

nodechecker.com

Nodechecker website nodechecker.com
CSS
23
star
7

restai-frontend

RestAI's Frontend
JavaScript
18
star
8

outkept

Auto-discover, reactive monitoring platform.
JavaScript
11
star
9

dashode

Simple HTTP daemon realtime web dashboard for clf based webservers.
JavaScript
11
star
10

dashode2

Realtime dashboard for nginx and other clf based webservers.
JavaScript
9
star
11

wireguarode

Wireguard with ACLs and TOTP 2FA
JavaScript
6
star
12

asusipmiploiter

ASUS iKVM/IPMI password disclosure PoC
Java
6
star
13

ipmifinder

Fast multi-threaded IPMI finder [tool]
Java
6
star
14

node-olx

JavaScript
6
star
15

lxjs-dns

Docker.io LXJS workshop DNS Server
JavaScript
5
star
16

puppet-cpanel

Stripped down generic cPanel installation Puppet module.
Puppet
5
star
17

statode

Node.js email driven status page
CSS
4
star
18

ssh2-multiplexer

SSH2 exec channel queuer/multiplexer/backpressure
JavaScript
4
star
19

realtimechat

Quick and dirty internal full JS web realtime chat using node.JS+socket.IO+Redis
JavaScript
3
star
20

nodechecker-engine

Nodechecker.com engine
JavaScript
3
star
21

capi

Python daemon that watches and dispatch fresh entries in your logs to Redis
Python
3
star
22

swiffy-jquery

Google Swiffy runtime updated to be compatible with jQuery
JavaScript
2
star
23

botbeans

Botbeans, Meet and greet programming.
Java
2
star
24

massconsole

Light and dependency free, SSH Mass Console [tool]
Java
2
star
25

nodechecker-crawler

Nodechecker.com NPM crawler
JavaScript
2
star
26

npmjs.pt

NPM mirror hosted in Portugal
CSS
2
star
27

email2sms

JavaScript
2
star
28

langchain_sysadmin

LangChain GPT based sysadmin assistant
Python
2
star
29

node-logicboxes

Nodejs module for Logicboxes HTTP API - https://manage.logicboxes.com/kb/answer/751
JavaScript
1
star
30

incept-cli

incept-cli
JavaScript
1
star
31

shipode

Node.js based CLF log shipper.
JavaScript
1
star
32

node-onapp

Onapp client implementation in node.js
JavaScript
1
star
33

outke.pt

Outkept website - http://outke.pt
CSS
1
star
34

nodechecker-janitor

JavaScript
1
star
35

incept-drone

incept-drone
JavaScript
1
star
36

establish

Establish
JavaScript
1
star
37

langchain_ingest

Python
1
star
38

node-moss

MOSS node.js assignment
JavaScript
1
star
39

nodechecker-processor

JavaScript
1
star
40

node-nocps

NOC-PS xml-rpc node.js wrapper
JavaScript
1
star
41

incept-balancer

incept-balancer
JavaScript
1
star
42

outkept-dashboard

Outkept's Dashboard
HTML
1
star
43

outkept-handbook

http://outke.pt documentation.
1
star
44

botbeans_bot

Botbeans internal robot code.
Java
1
star
45

netboxvms

Export and sync VM metadata from multiple platforms to Netbox.
JavaScript
1
star
46

outkept_core

Old Java Outkept daemon (deprecated)
Java
1
star
47

nodechecker-api

Nodechecker.com API
JavaScript
1
star
48

node-supportpal

Node.js client for SupportPal help desk.
JavaScript
1
star
49

incept-router

incept-router
JavaScript
1
star
50

nodechecker-balancer

Nodechecker.com nodes load balancer
JavaScript
1
star
51

urbaneous

urbaneous.com events aggregator
JavaScript
1
star