Skip to content

barrage/ragu

Repository files navigation

Ragu Logo

Ragu Application Repository

Ragu is a system for creating and managing agents.

Table of Contents

Components

  • Ragu Chunker (ragu-chunker): Document processing and chunking service
  • Ragu Web App (ragu-web-app): Frontend application for user interaction
  • Ragu Chat API (ragu-chat-api): Backend API for chat functionality

This repository contains all components and setup instructions for the Ragu application stack.

Prerequisites:

Getting Started

This chapter will cover steps to start the Ragu application stack on your local machine utilizing OpenAI for embeddings and llms and Google as Oauth provider.

Detailed Oauth information can be found in ragu-chat-api documentation Authentication Chapter

Supported providers:

Oauth LLM Embedder
Google OpenAI OpenAI
Apple Azure Azure
Carnet Ollama (for local development) Onnx Compatible models (for local development)

This article will cover cloud based solution with OpenAI and Azure. Local development guide will be provided in the future releases.

Clone the repository

The repository contains submodules, so make sure to clone it with the --recurse-submodules flag.

Clone the repository with submodules

git clone --recurse-submodules https://github.com/barrage/ragu.git

Load submodules if you forgot to clone with --recurse-submodules

git submodule init && \
git submodule update

Configure the environment

Minimal requirements are an Oauth provider and OpenAI API key.

Oauth configuration

Having an Oauth2 client id and secret is required to run the application. Obtain these from Google or Apple or Carnet. For example, if we want to enable Google Oauth and create, edit the following files:

  • config/ragu-chat-api/application.conf
...
features {
    ...
    oauth {
        google = true
    }
    ...
}
...
// use this to create the initial admin account
// be careful to use the email of your Oauth provider account
admin {
  email = "[email protected]"
  fullName = "Admin"
  firstName = "Admin"
  lastName = "Admin"
}
...
oauth {
    google {
      tokenEndpoint = "tokenEndpoint"
      keysEndpoint = "keysEndpoint"
      tokenIssuer = "tokenIssuer"
      accountEndpoint = "accountEndpoint"
      clientId = "clientId"
      clientSecret = "clientSecret"
    }
}
...
  • config/ragu-web-app/.env
...
OAUTH_GOOGLE_LOGIN_CLIENTID=google-client-id
...

The rest of the stack is configured to work together but feel free to make changes that suit your needs. And/or vendors.

OpenAI configuration

An OpenAI API key is required to run the application. Obtain this from OpenAI. Edit the following files:

  • config/ragu-chat-api/application.conf
...
llm {
    openai {
      endpoint = "https://api.openai.com/v1/"
      apiKey = "apiKey"
    }
}
...
  • config/ragu-chunker/.env
...
OPENAI_KEY="open-ai-key"
...

Starting Ragu

Un*x systems

docker compose -f docker-compose-infra.yaml up -d \
  && docker compose up -d

Windows PowerShell

docker compose -f docker-compose-infra.yaml up -d;
docker compose up -d

First the infrastructure services are started which must be fully ready and accepting connections so the application services can perform migrations and code generation from database schema.

The infrastructure services are included in the main docker-compose.yaml file, therefore after the initial setup the stack can be managed by it i.e. by just using the docker compose command.

This process may take a while depending on your system, especially on ARM machines.

Volumes

You can define volumes persist data on your host machine.

# docker-compose-infra.yaml
volumes:
  postgres_data:
  qdrant_data:
  weaviate_data:
# docker-compose.yaml
volumes:
  chonkit_data:

Notes

Currently, the whole stack is built from source. In the future releases we will provide artifacts like binaries, prebuilt images etc... ragu-chunkger is built in compatibility mode for arm64 systems which will cause slow compilation time on those systems.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published