gb/restart.sh
Rodrigo Rodriguez (Pragmatismo) 3befc141e5 Fix token limits for local llama.cpp server
- Add token-aware text truncation utility in core/shared/utils.rs
- Fix embedding generators to use 600 token limit (safe under 768)
- Fix LLM context limit detection for local models (768 vs 4096)
- Prevent 'exceed context size' errors for both embeddings and chat
2026-02-02 11:56:13 -03:00

28 lines
740 B
Bash
Executable file

#!/bin/bash
set -e
echo "🛑 Stopping existing processes..."
pkill -f botserver || true
pkill -f botui || true
pkill -f rustc || true
echo "🧹 Cleaning logs..."
rm -f botserver.log botui.log
echo "🔨 Building botserver..."
cargo build -p botserver
echo "🔨 Building botui..."
cargo build -p botui
echo "🚀 Starting botserver..."
RUST_LOG=info ./target/debug/botserver --noconsole > botserver.log 2>&1 &
BOTSERVER_PID=$!
echo "🚀 Starting botui..."
BOTSERVER_URL="https://localhost:8088" ./target/debug/botui > botui.log 2>&1 &
BOTUI_PID=$!
echo "✅ Started botserver (PID: $BOTSERVER_PID) and botui (PID: $BOTUI_PID)"
echo "📊 Monitor with: tail -f botserver.log botui.log"
echo "🌐 Access at: http://localhost:3000"