Code Monkey home page Code Monkey logo

arguflow's Introduction

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

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 python requirements

pip install -r ./server/server-python/requirements.txt

Make server tmp dir

mkdir server/tmp

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

Install ImageMagick (Linux) - only needed if you want to use pdf_from_range route

apt install libjpeg-dev libpng-dev libtiff-dev

curl https://imagemagick.org/archive/ImageMagick.tar.gz | tar xz
cd ImageMagick
./configure
make uninstall
make install

How to debug diesel by getting the exact generated SQL

diesel::debug_query(&query).to_string();

arguflow's People

Contributors

skeptrunedev avatar densumesh avatar cdxker avatar anikdhabal avatar rohit-singh-bisht avatar poke5352 avatar scorpil avatar prasathhari avatar dv04 avatar ramk777-stack avatar rishi-raj-jain avatar amaransen avatar chetax avatar heetvekariya avatar neel-07 avatar ujwalkumar1995 avatar varun2002 avatar bharath090909 avatar hemxnt avatar vid277 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.