#!/bin/bash
# Script to run the Keet bot on the second device
# Set the storage directory
STORAGE_DIR="second-device-keet/storage"
# Check if a room key was provided
if [ -z "$1" ]; then
echo "Usage: $0 <room-key> [model]"
echo "Example: $0 pear://keet/abcdef123456 llama3.1:latest"
exit 1
fi
ROOM_KEY="$1"
# Set the model (default to llama3.1:latest if not provided)
MODEL=${2:-"llama3.1:latest"}
# Update identity files to ensure a real identity
echo "Updating identity files to ensure real identity..."
node tests/update_real_keet_identity.js --storage="$STORAGE_DIR" --name="KeetBot Mobile"
# Note: The keet_cmd.js script has been modified to ensure anonymous=false in the identity
echo "Using modified keet_cmd.js script to ensure real identity..."
# Run the Keet bot on the second device
echo "Starting Keet bot on second device with room key: $ROOM_KEY and model: $MODEL"
node second-device-keet/keet_cmd.js --room-key="$ROOM_KEY" --storage="$STORAGE_DIR" --model="$MODEL" --name="KeetBot Mobile" --verbose