-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from cloudnautique/main
chore - move docs to this repo
- Loading branch information
Showing
27 changed files
with
15,458 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Validate docs build | ||
on: | ||
push: | ||
paths: | ||
- docs/** | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- docs/** | ||
branches: | ||
- main | ||
|
||
jobs: | ||
validate-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: make init-docs | ||
- run: make validate-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Getting Started", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Installation instructions for Rubra." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Installation | ||
--- | ||
|
||
:::note | ||
|
||
Ensure you have met the [prerequisites](/getting-started/prerequisites) before proceeding with the installation. | ||
|
||
::: | ||
|
||
To install Rubra, follow these steps: | ||
|
||
1. Clone the Rubra GitHub repository by running the following command in your terminal: | ||
|
||
```shell | ||
git clone https://github.com/sanjay920/rubra.git | ||
``` | ||
|
||
2. Change into the `rubra` directory: | ||
|
||
```shell | ||
cd rubra | ||
``` | ||
|
||
3. Specify the models you want to give Rubra access to by editing the `llm-config.yaml` file. See [LLM Configution instructions](/getting-started/llm-config) for more information. | ||
|
||
4. Pull the required Docker images and start Rubra | ||
|
||
```shell | ||
docker-compose pull && docker-compose up -d | ||
``` | ||
|
||
After following these steps, Rubra should be successfully installed and running on your local machine. | ||
|
||
You can access the Rubra UI by visiting [http://localhost:8501](http://localhost:8501/) in your browser. | ||
|
||
You can develop with Rubra backend by setting the OpenAI base URL to Rubra backend's URL. By default, Rubra backend runs on [http://localhost:8000](http://localhost:8000/). | ||
``` | ||
from openai import OpenAI | ||
client = OpenAI(base_url="http://localhost:8000/", api_key="abc") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
id: llm-config | ||
title: LLM Configuration | ||
sidebar_label: Configure LLMs | ||
--- | ||
|
||
Before getting started with Rubra, make sure you configure what models you want to give Rubra access to by editing the `llm-config.yaml` file. | ||
|
||
We currently use [LiteLLM](https://docs.litellm.ai/docs/proxy/configs#quick-start) as the chat completions server. This may change in the future. | ||
|
||
The models currently supported: | ||
|
||
* OpenAI | ||
* GPT-4-turbo (*gpt-4-1106-preview*) | ||
* Anthropic | ||
* claude-2.1 | ||
* Local Models | ||
* See [Local LLM Deployment](/getting-started/prerequisites#local-llm-deployment-optional) for more information | ||
* Must be named `openai/custom` | ||
|
||
This is what you config file should look like: | ||
|
||
```yaml | ||
model_list: | ||
- model_name: gpt-4-1106-preview | ||
litellm_params: | ||
model: gpt-4-1106-preview | ||
api_key: "OPENAI_API_KEY" | ||
custom_llm_provider: "openai" | ||
- model_name: claude-2.1 | ||
litellm_params: | ||
model: claude-2.1 | ||
api_key: "CLAUDE_API_KEY" | ||
# the following is for locally running LLMs deployed with LM Studio or llama.cpp | ||
- model_name: custom | ||
litellm_params: | ||
model: openai/custom | ||
api_base: "http://host.docker.internal:1234/v1" # host.docker.internal allows docker to use your local machine's IP address (localhost) | ||
api_key: "None" | ||
custom_llm_provider: "openai" | ||
|
||
litellm_settings: | ||
drop_params: True | ||
set_verbose: True | ||
cache: True | ||
|
||
# For caching | ||
environment_variables: | ||
REDIS_HOST: "redis" | ||
REDIS_PORT: "6379" | ||
REDIS_PASSWORD: "" | ||
``` | ||
Edit model list to include the models you want to use. To use Rubra, you need to specify at least one model. | ||
[Architecture Diagram] (/img/llm-config.svg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
id: prerequisites | ||
title: Prerequisites | ||
sidebar_label: Prerequisites | ||
sidebar_position: 0 | ||
--- | ||
|
||
Before getting started with Rubra, make sure you have the following prerequisites installed on your machine: | ||
|
||
## Docker Desktop | ||
|
||
Rubra relies on Docker Desktop to run the application and manage the development environment. Docker Desktop includes Docker Compose, which allows you to define and run multi-container Docker applications. | ||
|
||
### Mac | ||
|
||
To install Docker Desktop on macOS, follow these steps: | ||
|
||
1. Visit the [Docker Desktop for Mac installation guide](https://docs.docker.com/desktop/install/mac-install/) and follow the instructions provided. | ||
|
||
### Linux | ||
|
||
To install Docker Desktop on Linux, follow these steps: | ||
|
||
1. Visit the [Docker Desktop for Linux installation guide](https://docs.docker.com/desktop/install/linux-install/) and follow the instructions provided. | ||
|
||
### Windows | ||
|
||
To install Docker Desktop on Windows, follow these steps: | ||
|
||
1. Visit the [Docker Desktop for Windows installation guide](https://docs.docker.com/desktop/install/windows-install/) and follow the instructions provided. | ||
|
||
--- | ||
|
||
## Local LLM Deployment (Optional) | ||
|
||
You must run a model locally if you'd like to create assistants that run on 100% on your machine. We recommend the [OpenHermes model](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B). We have tested Rubra with [this quanitized variant](https://huggingface.co/TheBloke/OpenHermes-2.5-neural-chat-v3-3-Slerp-GGUF) of the OpenHermes model, but you can use any model you want at your own risk. Let us know if you'd like support for other models! | ||
|
||
### LM Studio | ||
|
||
1. Download LM Studio from [https://lmstudio.ai/](https://lmstudio.ai/) and the model you want to use. | ||
2. Go to the "local inference server" tab, load the model and configure your settings. | ||
3. Click "Start server". By default, LM Studio runs on [http://localhost:1234](http://localhost:1234) but you can configure this. | ||
|
||
### llama.cpp | ||
|
||
#### Suggested approach | ||
|
||
Follow instructions found in the [llama.cpp repo](https://github.com/ggerganov/llama.cpp). | ||
|
||
#### Alternative approach | ||
|
||
We have a pre-built docker image for llama.cpp that can be uncommented and enabled in docker-compose.yml | ||
|
||
* Does not take advantage of GPU acceleration, so it is slower | ||
* We will add NVIDIA GPU support soon | ||
* Docker doesn't work with Apple Silicon. We recommend running llama.cpp natively if you're looking to leverage the iGPU found in M series Macs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Intro | ||
slug: / | ||
position: 0 | ||
--- | ||
|
||
# Introduction | ||
|
||
## Overview | ||
|
||
Rubra is an open source platform that merges a ChatGPT-like interface with an OpenAI compatible backend. No need to change your existing LLM apps that leverage OpenAI assistants, Rubra is a drop in replacement for OpenAI's API. | ||
|
||
With Rubra you get a chat inreface that is familiar to users, and a backend that is familiar to developers. Create assistants with a few clicks through the UI or through code. Use locally running LLMs or use proprietary ones like GPT4 and Claude. Rubra allows you to mix and match. | ||
|
||
Most importantly, **you are in control of your data** - Rubra is designed to be self-hosted, allowing you to keep your data private and secure. | ||
|
||
## Key Components | ||
|
||
### Rubra Frontend | ||
|
||
- **Features a familiar, ChatGPT-style interface** | ||
- Create assistants with a few clicks - no coding required | ||
- Customize your assistant's name, description, and give it knowledge by uploading files for automated RAG | ||
- Chat with your assistants and various proprietary LLMs like GPT4 and Claude | ||
|
||
### Rubra Backend | ||
|
||
- **OpenAI Compatibility:** Drop in replacement for OpenAI's API, allowing for seamless integration with existing functionality. Check out the [API](https://platform.openai.com/docs/introduction) for more information | ||
- **Support for Multiple Models:** Accommodates various AI models, including Claude, Gemini, and open-source options | ||
- **Scalability:** Rubra leverages docker - so you can easily scale up Rubra components to meet your consumption requirements | ||
|
||
## Getting Started | ||
|
||
- **Self-Hosted:** Rubra is designed to be self-hosted, allowing you to keep your data private and secure. Check out the [installation guide](/getting-started/installation) to get started | ||
- **Cloud:** One click deploy to [Acorn](https://www.acorn.io/) and AWS ECS instructions coming soon | ||
|
||
[Architecture Diagram] (/img/application-architecture-diagram.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Rubra Backend", | ||
"position": 3, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Details about Rubra backend." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "Rubra Frontend", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Details about Rubra frontend." | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
id: rubra-frontend-chat | ||
title: Rubra Chat | ||
sidebar_label: Chat | ||
--- | ||
|
||
Rubra frontend provides a chat interface that allows users to interact with Language Language Models and Assistants that they've configured. This interface is designed to be intuitive and user-friendly, similar to ChatGPT. | ||
|
||
## How to Use | ||
|
||
To start a chat, navigate to the chat interface on the Rubra frontend. Select the LLM or Assistant you wish to chat with from the dropdown menu and start typing your message in the chat box. | ||
|
||
[] (/img/rubra-frontend-chat-recording.gif) | ||
|
||
For more detailed instructions, refer to the [User Guide] (./user-guide.md). | ||
|
||
## Features in Development | ||
|
||
- Chat history: We are currently working on adding a chat history feature that will allow users to view their past conversations. These conversations are currently stored in Rubra backend. |
Oops, something went wrong.