Docs: 9router + Hermes Agent local AI stack with Telegram (9router routes model via combo)

This commit is contained in:
cania
2026-08-11 17:50:23 +02:00
commit da4b918e68
7 changed files with 332 additions and 0 deletions

29
files/setup-9router.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
# setup-9router.sh — connect Ollama + create combo "free" on a running 9router.
# Usage: ./setup-9router.sh <dashboard_password> <ollama_api_key>
# Requires 9router already listening on http://127.0.0.1:20128
set -e
PASS="$1"
OLLAMA_KEY="$2"
BASE=http://127.0.0.1:20128
CK=/tmp/9r-ck.txt
[ -z "$PASS" ] && { echo "usage: $0 <dashboard_password> <ollama_api_key>"; exit 1; }
[ -z "$OLLAMA_KEY" ] && { echo "usage: $0 <dashboard_password> <ollama_api_key>"; exit 1; }
echo "==> login"
curl -s -c "$CK" -X POST "$BASE/api/auth/login" \
-H "Content-Type: application/json" -d "{\"password\":\"$PASS\"}" >/dev/null
echo "==> connect Ollama"
curl -s -b "$CK" -X POST "$BASE/api/providers" \
-H "Content-Type: application/json" \
-d "{\"provider\":\"ollama\",\"authType\":\"apiKey\",\"apiKey\":\"$OLLAMA_KEY\"}"
echo "==> create combo 'free' (fallback gpt-oss:120b + minimax-m3)"
curl -s -b "$CK" -X POST "$BASE/api/combos" \
-H "Content-Type: application/json" \
-d '{"name":"free","kind":"fallback","models":["ollama/gpt-oss:120b","ollama/minimax-m3"]}'
echo "==> done. Hermes should use model: \"free\""