Renamed to lorabot
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# meshbot
|
||||
# lorabot
|
||||
|
||||
Bridges a [MeshCore](https://meshcore.io) companion radio to any OpenAI-compatible LLM endpoint
|
||||
(e.g. `llama-server`, vLLM, Ollama). Listens for direct messages on the device, runs each
|
||||
@@ -14,19 +14,19 @@ pip install -e .
|
||||
cp config.example.toml config.toml
|
||||
# edit serial_port and [llm] in config.toml
|
||||
|
||||
python -m meshbot
|
||||
python -m lorabot
|
||||
```
|
||||
|
||||
Config file path defaults to `./config.toml` and can be overridden with `MESHBOT_CONFIG`.
|
||||
Any field can be overridden via env vars, e.g. `MESHBOT_LLM__API_KEY=sk-...`.
|
||||
Config file path defaults to `./config.toml` and can be overridden with `LORABOT_CONFIG`.
|
||||
Any field can be overridden via env vars, e.g. `LORABOT_LLM__API_KEY=sk-...`.
|
||||
|
||||
## Layout
|
||||
|
||||
- `src/meshbot/bot.py` — connect, subscribe to `CONTACT_MSG_RECV`, dispatch each DM.
|
||||
- `src/meshbot/db.py` — SQLite schema and per-conversation repo functions.
|
||||
- `src/meshbot/llm.py` — `AsyncOpenAI` wrapper.
|
||||
- `src/meshbot/messages.py` — UTF-8-safe byte-length trimming.
|
||||
- `src/meshbot/config.py` — TOML + env-var settings (pydantic-settings).
|
||||
- `src/lorabot/bot.py` — connect, subscribe to `CONTACT_MSG_RECV`, dispatch each DM.
|
||||
- `src/lorabot/db.py` — SQLite schema and per-conversation repo functions.
|
||||
- `src/lorabot/llm.py` — `AsyncOpenAI` wrapper.
|
||||
- `src/lorabot/messages.py` — UTF-8-safe byte-length trimming.
|
||||
- `src/lorabot/config.py` — TOML + env-var settings (pydantic-settings).
|
||||
|
||||
## Docker
|
||||
|
||||
@@ -34,23 +34,23 @@ Build and push a multi-arch image (`linux/amd64` + `linux/arm64`):
|
||||
|
||||
```sh
|
||||
docker login registry.example.com # once
|
||||
export MESHBOT_IMAGE=registry.example.com/team/meshbot
|
||||
export LORABOT_IMAGE=registry.example.com/team/lorabot
|
||||
./scripts/build-and-push.sh # tags: latest + <git sha>
|
||||
EXTRA_TAGS="v0.1.0" ./scripts/build-and-push.sh # add explicit version
|
||||
PUSH=0 PLATFORMS=linux/amd64 ./scripts/build-and-push.sh # local load only
|
||||
```
|
||||
|
||||
Run via compose (set `MESHBOT_IMAGE`, `MESHBOT_LLM_BASE_URL`, `MESHBOT_LLM_MODEL`,
|
||||
optionally `MESHBOT_DEVICE`):
|
||||
Run via compose (set `LORABOT_IMAGE`, `LORABOT_LLM_BASE_URL`, `LORABOT_LLM_MODEL`,
|
||||
optionally `LORABOT_DEVICE`):
|
||||
|
||||
```sh
|
||||
export MESHBOT_IMAGE=registry.example.com/team/meshbot:latest
|
||||
export MESHBOT_LLM_BASE_URL=http://llama:8080/v1
|
||||
export MESHBOT_LLM_MODEL=llama-3.1-8b-instruct
|
||||
export MESHBOT_DEVICE=/dev/ttyUSB0
|
||||
export LORABOT_IMAGE=registry.example.com/team/lorabot:latest
|
||||
export LORABOT_LLM_BASE_URL=http://llama:8080/v1
|
||||
export LORABOT_LLM_MODEL=llama-3.1-8b-instruct
|
||||
export LORABOT_DEVICE=/dev/ttyUSB0
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
The container expects `config.toml` mounted at `/etc/meshbot/config.toml` and
|
||||
The container expects `config.toml` mounted at `/etc/lorabot/config.toml` and
|
||||
persists SQLite to a named volume at `/data`. Any field can still be overridden
|
||||
via `MESHBOT_<SECTION>__<KEY>` env vars.
|
||||
via `LORABOT_<SECTION>__<KEY>` env vars.
|
||||
|
||||
Reference in New Issue
Block a user