Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Commit 098b719

Browse files
Fix v88
1 parent 8f3af9c commit 098b719

File tree

3 files changed

+79
-1
lines changed

3 files changed

+79
-1
lines changed

apps/chat/app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def load_crew():
4949

5050
# Роуты
5151
app.include_router(api_router)
52-
app.include_router(health_router)
52+
# app.include_router(health_router)
5353

5454
# Трейсинг и лог старта
5555
setup_tracing(app)

scripts/smoke-public-test.sh

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/bin/bash
2+
set -e
3+
4+
### ============================
5+
### 🌐 Public endpoint
6+
### ============================
7+
BASE_CHAT_API="http://chat.syncjob.ru"
8+
9+
### 1. Check /health on litellm
10+
echo "🔍 [1] Checking /health on litellm"
11+
curl --fail -s -o /dev/null -w "litellm health: %{http_code}\n" "$BASE_CHAT_API/health"
12+
13+
### 2. Check OpenAPI docs
14+
echo "🔍 [2] Checking OpenAPI JSON"
15+
curl --fail -s -o /dev/null -w "openapi.json: %{http_code}\n" "$BASE_CHAT_API/openapi.json"
16+
17+
### 3. Check /docs page
18+
echo "🔍 [3] Checking /docs UI"
19+
curl --fail -s -o /dev/null -w "docs: %{http_code}\n" "$BASE_CHAT_API/docs"
20+
21+
### 4. POST /chat/completions (litellm logic)
22+
echo "🧠 [4] Checking litellm: /chat/completions"
23+
RESPONSE=$(curl -s -X POST "$BASE_CHAT_API/chat/completions" \
24+
-H 'Content-Type: application/json' \
25+
-d '{
26+
"model": "openai/gpt-4.1",
27+
"messages": [
28+
{"role": "system", "content": "Ты ассистент, отвечай лаконично."},
29+
{"role": "user", "content": "Привет! Скажи как дела?"}
30+
]
31+
}')
32+
echo "🔁 litellm response:"
33+
echo "$RESPONSE"
34+
echo
35+
36+
### 5. Old /chat endpoint (chat-api legacy)
37+
echo "💬 [5] Checking chat-api legacy endpoint"
38+
RESPONSE=$(curl -s -X POST "$BASE_CHAT_API/api/v1/chat" \
39+
-H 'Content-Type: application/json' \
40+
-d '{
41+
"messages": [
42+
{"role": "user", "content": "Как дела?"}
43+
]
44+
}')
45+
echo "🔁 chat-api legacy response:"
46+
echo "$RESPONSE"
47+
echo
48+
49+
### 6. Create project
50+
echo "📁 [6] Creating new project"
51+
PROJECT=$(curl -s -X POST "$BASE_CHAT_API/api/v1/projects" \
52+
-H 'Content-Type: application/json' \
53+
-d '{"name": "Test Project"}')
54+
PROJECT_ID=$(echo $PROJECT | grep -oP '"id":\s*"\K[^"]+')
55+
echo "✅ Project created: $PROJECT_ID"
56+
echo
57+
58+
### 7. Send message inside the project
59+
echo "💬 [7] Sending message to project chat"
60+
RESPONSE=$(curl -s -X POST "$BASE_CHAT_API/api/v1/projects/$PROJECT_ID/chat" \
61+
-H 'Content-Type: application/json' \
62+
-d '{
63+
"messages": [
64+
{"role": "user", "content": "Расскажи анекдот"}
65+
]
66+
}')
67+
echo "🔁 chat-api project response:"
68+
echo "$RESPONSE"
69+
echo
70+
71+
### 8. Retrieve message history
72+
echo "📜 [8] Fetching project history"
73+
RESPONSE=$(curl -s "$BASE_CHAT_API/api/v1/projects/$PROJECT_ID/history")
74+
echo "📄 Message history:"
75+
echo "$RESPONSE"
76+
echo
77+
78+
echo "✅ Public smoke test completed successfully."

0 commit comments

Comments
 (0)