Home

Awesome

<p align="center"> <img height="100" src="https://cdn.trieve.ai/trieve-logo.png" alt="Trieve Logo"> </p> <p align="center"> <strong><a href="https://dashboard.trieve.ai">Sign Up (1k chunks free)</a> | <a href="https://pdf2md.trieve.ai">PDF2MD</a> | <a href="https://docs.trieve.ai">Hacker News Search Engine</a> | <a href="https://docs.trieve.ai">Documentation</a> | <a href="https://cal.com/nick.k/meet">Meet a Maintainer</a> | <a href="https://discord.gg/eBJXXZDB8z">Discord</a> | <a href="https://matrix.to/#/#trieve-general:trieve.ai">Matrix</a> </strong> </p> <p align="center"> <a href="https://github.com/devflowinc/trieve/stargazers"> <img src="https://img.shields.io/github/stars/devflowinc/trieve.svg?style=flat&color=yellow" alt="Github stars"/> </a> <a href="https://discord.gg/CuJVfgZf54"> <img src="https://img.shields.io/discord/1130153053056684123.svg?label=Discord&logo=Discord&colorB=7289da&style=flat" alt="Join Discord"/> </a> <a href="https://matrix.to/#/#trieve-general:trieve.ai"> <img src="https://img.shields.io/badge/matrix-join-purple?style=flat&logo=matrix&logocolor=white" alt="Join Matrix"/> </a> </p> <h2 align="center"> <b>All-in-one solution for search, recommendations, and RAG</b> </h2> <a href="https://trieve.ai"> <img src="https://cdn.trieve.ai/landing-tabs/light-api.webp"> </a>

Quick Links

Features

Are we missing a feature that your use case would need? - call us at 628-222-4090, make a Github issue, or join the Matrix community and tell us! We are a small company who is still very hands-on and eager to build what you need; professional services are available.

Local development with Linux

Debian/Ubuntu Packages needed packages

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

Arch Packages needed

sudo pacman -S base-devel postgresql-libs

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

Make server tmp dir

mkdir server/tmp

Install rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install cargo-watch

cargo install cargo-watch

Setup env's

cp .env.analytics ./frontends/analytics/.env
cp .env.chat ./frontends/chat/.env
cp .env.search ./frontends/search/.env
cp .env.server ./server/.env
cp .env.dashboard ./frontends/dashboard/.env

Add your LLM_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 LLM_API_KEY to be your own OpenAI API key.
  3. 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 recommend managing this through tmuxp, see the guide here or terminal tabs.

cd clients/ts-sdk
yarn build
cd frontends
yarn
yarn dev
cd server
cargo watch -x run
cd server
cargo run --bin ingestion-worker
cd server
cargo run --bin file-worker
cd server
cargo run --bin delete-worker
cd search
yarn
yarn dev

Verify Working Setup

Debugging issues with local dev

Reach out to us on discord for assistance. We are available and more than happy to assist.

Debug diesel by getting the exact generated SQL

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

Local Setup for Testing Stripe Features

Install Stripe CLI.

  1. stripe login
  2. stripe listen --forward-to localhost:8090/api/stripe/webhook
  3. set the STRIPE_WEBHOOK_SECRET in the server/.env to the resulting webhook signing secret
  4. stripe products create --name trieve --default-price-data.unit-amount 1200 --default-price-data.currency usd
  5. stripe plans create --amount=1200 --currency=usd --interval=month --product={id from response of step 3}

Contributors

<a href="https://github.com/devflowinc/trieve/graphs/contributors"> <img alt="contributors" src="https://contrib.rocks/image?repo=devflowinc/trieve"/> </a>