12 lines
594 B
Bash
12 lines
594 B
Bash
#!/bin/bash
|
|
sudo -n systemctl restart swarmui
|
|
sleep 40
|
|
S=$(curl -s -X POST http://127.0.0.1:7801/API/GetNewSession -H 'Content-Type: application/json' -d '{}' | sed -n 's/.*"session_id": *"\([^"]*\)".*/\1/p')
|
|
for api in AssistentListChats AssistentListTrainSamples AssistentListMemory; do
|
|
echo "--- $api ---"
|
|
curl -s -X POST "http://127.0.0.1:7801/API/$api" -H 'Content-Type: application/json' -d "{\"session_id\":\"$S\"}" | head -c 300
|
|
echo
|
|
done
|
|
echo "--- log ---"
|
|
sudo -n journalctl -u swarmui --no-pager --since '-3min' | grep -iE 'assistent|error|private dep' | tail -n 15
|