backend: implement agents and connect them with chats

This commit is contained in:
Shivering Ocelot committed 2025-05-12 12:55:50 -05:00
1 parent e57e5ba16a
commit 49df72f2a1
9 files changed
+313 -40

No files matched your search

+17 -5
View File
@@ -1,10 +1,17 @@
#!/bin/bash
source .venv/bin/activate
if [ -f .env ]; then
source .env
export REPLICATE_API_TOKEN
fi
case "$1" in
"")
mkdir -p local-data
cd backend
source ../.venv/bin/activate
python app.py
python app.py ../test-data
;;
"test")
# Setup test data directory
@@ -13,7 +20,6 @@ case "$1" in
# Start backend in the background
cd backend
source ../.venv/bin/activate
python app.py ../test-data &
BACKEND_PID=$!
echo "Started backend: $BACKEND_PID"
@@ -31,7 +37,6 @@ case "$1" in
"debug")
# Debug doesn't work very well... I don't use it.
cd backend
source ../.venv/bin/activate
python app.py &
cd ../frontend
@@ -51,6 +56,13 @@ case "$1" in
done
;;
*)
echo "Error: unknown command '$1'"
if [ -d "$1" ]; then
data_dir=../$1
mkdir -p local-data
cd backend
python app.py $data_dir
else
echo "Error: unknown command or directory '$1'"
fi
;;
esac