-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_api.sh
More file actions
executable file
·32 lines (27 loc) · 812 Bytes
/
test_api.sh
File metadata and controls
executable file
·32 lines (27 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "🧪 Test de l'API LangGraph"
echo "=========================="
echo ""
# Test de santé de l'API
echo "1. Test de santé..."
curl -s http://localhost:8123/health || echo "❌ API non accessible"
echo ""
# Test de l'endpoint des assistants
echo "2. Liste des assistants..."
curl -s http://localhost:8123/assistants | python3 -m json.tool || echo "❌ Impossible de lister les assistants"
echo ""
# Test d'exécution simple
echo "3. Test d'exécution..."
curl -X POST http://localhost:8123/runs/stream \
-H "Content-Type: application/json" \
-d '{
"assistant_id": "chatbot",
"input": {
"messages": [
{"role": "human", "content": "Dis bonjour!"}
]
},
"stream_mode": "messages"
}' || echo "❌ Erreur d'exécution"
echo ""
echo "✅ Tests terminés"