https://github.com/joshua-mo-143/ballista
https://github.com/joshua-mo-143/ballista
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/joshua-mo-143/ballista
- Owner: joshua-mo-143
- Created: 2024-05-11T16:58:49.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-19T22:45:34.000Z (6 months ago)
- Last Synced: 2024-10-14T21:06:58.458Z (4 months ago)
- Language: Rust
- Size: 428 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - joshua-mo-143/ballista - (Rust)
README
# Ballista: Query Your Notes
## Introduction
Ever wanted to query your Obsidian notes using ChatGPT? Now you can! This Rust web service lets you do exactly that, by ingesting your Obsidian notes as embeddings into a Qdrant database and then using ChatGPT for prompting.## Usage
Usage assumes that your obsidian-git repo is in a private repo you own.This service is primarily (currently) deployed through Shuttle. To deploy it, do the following:
- Run `cargo shuttle init --from joshua-mo-143/ballista` and follow the instructions
- Copy `Secrets.toml.example` to `Secrets.toml` and fill out the secrets. See the following below for an explanation:
- `OPENAI_KEY`: An OpenAI API key for which you have funds on.
- `GITHUB_PERSONAL_ACCESS_TOKEN` - A GitHub Personal Access Token. You need at the very least `repo:read` permissions, since this is required to be able to download your obsidian-git repo if it's private.
- `GITHUB_USERNAME` - Your username (or alternatively - someone else's username, if you're using their obsidian-git repo).
- `GITHUB_REPO` - The repo you want to ingest. Note that only Markdown files are supported for now - Ballista will ignore anything else.
- `QDRANT_URL` - The URL of your Qdrant database. Note that the port needs to be 6334 as `qdrant_client` utilises the gRPC URL. If you're just trying this out locally, you can leave it blank.
- `QDRANT_API_KEY` - Your Qdrant API key. You can leave this blank if you're just running this locally.
- Run `cargo shuttle deploy` and watch the magic happen!
- Visit your deployment URL and try writing a prompt.
## Features
- Downloads your Markdown files from a GitHub repo and ingests it into ChatGPT embeddings, then stores it in Qdrant.
- Supports Github webhooks at `/webhooks/github` for self-updating with no input required on your side.
- Uses an internal queue for resilient updating. If your update fails, simply send the webhook again!## Isn't this just a ChatGPT wrapper?
Yes, but I don't want to pay exorbitant amounts just to be able to query my extremely small knowledge base. If you're interested in using this, I don't think you do either.