Skip to content

Build AI powered semantic search and LLM retrieval-augmented generation (RAG) fast

License

Notifications You must be signed in to change notification settings

poke5352/arguflow

 
 

Repository files navigation

Arguflow

Documentation | Blog | Demo Video

Github stars GitHub last commit GitHub issues Join Discord Join Matrix Join Matrix

Arguflow is a truly all-in-one service for hosting AI powered semantic search and LLM retrieval-augmented generation (RAG) on your data.

arguflow architecture diagram

Live Demos

How to contribute

  1. Find an issue in the issues tab that you would like to work on.
  2. Fork the repository and clone it to your local machine
  3. Create a new branch with a descriptive name: git checkout -b your-branch-name
  4. Solve the issue by adding or removing code on your forked branch.
  5. Test your changes locally to ensure that they do not break anything
  6. Commit your changes with a descriptive commit message: git commit -m "Add descriptive commit message here"
  7. Push your changes to your forked repository: git push origin your-branch-name
  8. Open a pull request to the main repository and describe your changes in the PR description

Self-hosting the API and UI's

We have a full self-hosting guide available on our documentation page here.

Local development with Linux

Install apt packages

sudo apt install curl \
gcc \
g   \
make \
pkg-config \
python3 \
python3-pip \
libpq-dev \
libssl-dev \
openssl \
libreoffice

Install NodeJS and Yarn

You can install NVM using its install script.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

You should restart the terminal to update bash profile with NVM. Then, you can install NodeJS LTS release and Yarn.

nvm install --lts
npm install -g yarn

Install node requirements

yarn --cwd ./server/server-nodejs

Install cargo-watch

cargo install cargo-watch

Setup env's

cp .env.chat ./chat/.env
cp .env.search ./search/.env
cp .env.server ./server/.env

Add your OPENAI_API_KEY to ./server/.env

Here is a guide for acquiring that.

Steps once you have the key

  1. Open the ./server/.env file
  2. Replace the value for OPENAI_API_KEY to be your own OpenAI API key.

Start docker container services needed for local dev

cat .env.chat .env.search .env.server .env.docker-compose > .env
./convenience.sh -l

Start services for local dev

We know this is bad. Currently, We recommend managing this through tmux or VSCode terminal tabs.

cd server
cargo watch -x run
cd search
yarn
yarn dev
cd chat
yarn
yarn dev

Local development with Windows

Install NodeJS and Yarn

You can download the latest version NodeJS from here. Open the downloaded file and follow the steps from the installer.

After completing the installation, open a powershell with administrator permissions.

npm install -g yarn

After installation, yarn might throw an error when used due to Window's execution policy. Change the execution policy to allow scripts to be executed by applications that are signed by a trusted publisher by putting this command in an admin powershell.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Install Rust

You can download the latest version of Rust from here. Follow the installer's directions and install the prerequisites.

After installation, open a new powershell window with administrator permissions.

cargo install cargo-watch

Install Docker

Follow the instructions to download Docker Desktop for Windows from here. You may need to follow the instructions to enable WSL 2.

Install Postgres dependencies for building

Download PostgreSQL 13 from here. You should not use any other version of PostgreSQL due to there being an issue with diesel on other versions.

When installing, ensure that the PostgreSQL server is set to a port other than 5432 to prevent it from interfering with the docker container.

Add Postgres to PATH

[Environment]::SetEnvironmentVariable("PATH", $Env:PATH   ";C:\Program Files\PostgreSQL\13\lib;C:\Program Files\PostgreSQL\13\bin", [EnvironmentVariableTarget]::Machine)

Setup env's

cp .env.chat ./chat/.env
cp .env.search ./search/.env
cp .env.server ./server/.env

Add your OPENAI_API_KEY to ./server/.env

Here is a guide for acquiring that.

Steps once you have the key

  1. Open the ./server/.env file
  2. Replace the value for OPENAI_API_KEY to be your own OpenAI API key.

Start Docker containers

Start the docker containers using the batch script.

Get-Content .env.chat, .env.search, .env.server, .env.docker-compose | Set-Content .env
./convenience.bat l

Start services for local dev

You need 3 different windows of powershell or use something like VSCode terminal tabs to manage it.

cd server
cargo watch -x run
cd search
yarn
yarn dev
cd chat
yarn
yarn dev

About

Build AI powered semantic search and LLM retrieval-augmented generation (RAG) fast

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.7%
  • CSS 10.8%
  • TypeScript 7.3%
  • Rust 5.8%
  • Astro 0.6%
  • HTML 0.6%
  • Other 0.2%