Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Kafka Messaging Service #12

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6f7afb3
feat: Add Nix flake and custom overlays (WIP)
G-structure Oct 8, 2024
73cf1bc
fix: Update Nix flake to build Python packages successfully
G-structure Oct 8, 2024
ce2ce9a
feat: Expose 'topos' in dev shell
G-structure Oct 8, 2024
5178413
fix: Resolve spaCy model loading issue
G-structure Oct 8, 2024
3500ca7
feat: Enhance Nix setup and update README
G-structure Oct 8, 2024
ab05857
fix: Restore spaCy model selection and config file functionality
G-structure Oct 11, 2024
446e4c7
feat: Integrate PostgreSQL setup in Nix development environment
G-structure Oct 10, 2024
5c0adaa
fix: Improve PostgreSQL setup in Nix development environment
G-structure Oct 10, 2024
a95b197
feat: Add initial Kafka setup in Nix development environment (WIP)
G-structure Oct 12, 2024
9e5272d
refactor: Replace flake-utils with flake-parts and improve flake stru…
G-structure Oct 14, 2024
dcabe4b
feat: Integrate process-compose and services-flake for improved servi…
G-structure Oct 14, 2024
de37d87
feat: Enhance Kafka setup and improve service dependencies
G-structure Oct 15, 2024
f0639a7
refactor: Clean up flake.nix and reorganize Nix-related files
G-structure Oct 15, 2024
170d35c
docs: Update README and justfile for improved Nix usage
G-structure Oct 15, 2024
99a7659
feat: Update Ollama model to dolphin-llama3
G-structure Oct 15, 2024
7520e54
feat: Implement group management and missed message functionality (WIP)
G-structure Oct 15, 2024
358d3c9
refactor: Migrate group management from SQLite to PostgreSQL (WIP)
G-structure Oct 15, 2024
1b5372b
feat: Implement Kafka-based chat system and group management API (WIP)
G-structure Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ONE_API_API_KEY="sk-oneapi.local123"
SUPABASE_URL=
SUPABASE_KEY=
POSTGRES_DB=test_topos_db
POSTGRES_USER=your_username
POSTGRES_USER=username
POSTGRES_PASSWORD=your_password
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432
54 changes: 39 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<em>Private AI Backend Service</em>
</p>

---
---

# Topos
A personal intelligence service, using your own computer to power private conversations with friends, family, and coworkers, collect/store your own private data, and use AI privately. Runs great with the [chat arena](https://github.com/jonnyjohnson1/chat-arena) app available on desktop and mobile.
Expand All @@ -19,23 +19,47 @@ You should be able to launch the Topos service anywhere from your machine.

## Install with nix (Recommended)
If nix is not installed:
1. Install nix:
macos/linux: `sh <(curl -L https://nixos.org/nix/install)`
windows: `sh <(curl -L https://nixos.org/nix/install) --daemon`
Run the software with nix:
1. Download this repo `git clone https://github.com/jonnyjohnson1/topos-cli`
2. `cd topos-cli`
3. build the backend service (only run the topos set --spacy trf line if it is your first time setting up)
1. Install nix:
macos/linux: `sh <(curl -L https://nixos.org/nix/install)`
windows: `sh <(curl -L https://nixos.org/nix/install) --daemon`
2. Run Topos and all its dependencies:
```
nix run github:jonnyjohnson1/topos-cli
```
This will start all services including Topos, Postgres, Kafka, and Ollama.

## Development
Clone the repository:
```
nix-shell
topos set --spacy trf
git clone https://github.com/jonnyjohnson1/topos-cli
cd topos-cli
```

For development, you have several options:
### Build Binary
First build topos binary (only usable on machines with nix installed)
```
nix build .#topos
```
run built binary
```
./result/bin/topos
```

### Dev Shell
```
nix develop
topos run
```

### Poetry Shell
```
nix develop .#poetry
```

## Install Instructions
requires `brew install just`
requires `brew install poetry`
requires `brew install python-tk`

## Graph Database - Install Neo4j

Expand All @@ -49,8 +73,8 @@ brew services start neo4j
install the topos package with the command `just build`

### Step 2: Set the Spacy Model Size
Set the size of the spacy model you wish to use on your system.
There are 'small', 'med', 'large', and 'trf'.
Set the size of the spacy model you wish to use on your system.
There are 'small', 'med', 'large', and 'trf'.

Use the tag like this.
`topos set --spacy small`
Expand All @@ -68,12 +92,12 @@ zrok is opensourced and free.
ngrok has a gated requests/month under its free tier, then requires you pay for it.

1. Be sure you have the `topos` server running already in another terminal.
2. [Install zrok command](https://docs.zrok.io/docs/getting-started/?_gl=1*1yet1eb*_ga*MTQ1MDc2ODAyNi4xNzE3MDE3MTE3*_ga_V2KMEXWJ10*MTcxNzAxNzExNi4xLjAuMTcxNzAxNzExNi42MC4wLjA.*_gcl_au*NDk3NjM1MzEyLjE3MTcwMTcxMTc.#installing-the-zrok-command)
2. [Install zrok command](https://docs.zrok.io/docs/getting-started/?_gl=1*1yet1eb*_ga*MTQ1MDc2ODAyNi4xNzE3MDE3MTE3*_ga_V2KMEXWJ10*MTcxNzAxNzExNi4xLjAuMTcxNzAxNzExNi42MC4wLjA.*_gcl_au*NDk3NjM1MzEyLjE3MTcwMTcxMTc.#installing-the-zrok-command)
3. `zrok enable <given_key>`
4. `zrok status` should show you information
5. Route local path through zrok: `zrok share public http://0.0.0.0:13341`
This will take you to a new screen with an https://<url> at the top.
Insert this url into the field under settings-> "Api Endpoints" -> "Custom API"
Insert this url into the field under settings-> "Api Endpoints" -> "Custom API"
6. After you've insert it into the field, press the test button, and "hello world" should appear next to the button.

[ ] Enable permanent sharing of zrok url [docs](https://docs.zrok.io/docs/guides/docker-share/#permanent-public-share) (requires Docker)
Expand Down
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
active_spacy_model: en_core_web_trf
204 changes: 204 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading