Major changes: - Add Go backend (backend/) with microservices architecture - Enhanced master-agents-svc: reranker, content-classifier, stealth-crawler, proxy-manager, media-search, fastClassifier, language detection - New web-svc widgets: KnowledgeCard, ProductCard, ProfileCard, VideoCard, UnifiedCard, CardGallery, InlineImageGallery, SourcesPanel, RelatedQuestions - Improved discover-svc with discover-db integration - Docker deployment improvements (Caddyfile, vendor.sh, BUILD.md) - Library-svc: project_id schema migration - Remove deprecated finance-svc and travel-svc - Localization improvements across services Made-with: Cursor
59 lines
1.3 KiB
Bash
Executable File
59 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Testing Chat via WebUI (localhost:3000)"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# Generate unique IDs
|
|
MESSAGE_ID="msg-$(date +%s)-$$"
|
|
CHAT_ID="chat-$(date +%s)-$$"
|
|
|
|
# Create the request payload with minimal required fields
|
|
PAYLOAD=$(cat <<EOF
|
|
{
|
|
"message": {
|
|
"messageId": "$MESSAGE_ID",
|
|
"chatId": "$CHAT_ID",
|
|
"content": "Привет, как дела?"
|
|
},
|
|
"optimizationMode": "balanced",
|
|
"history": [],
|
|
"locale": "ru"
|
|
}
|
|
EOF
|
|
)
|
|
|
|
echo "Sending chat request to http://localhost:3000/api/chat"
|
|
echo "Message: Привет, как дела?"
|
|
echo ""
|
|
|
|
# Send request and capture response
|
|
RESPONSE=$(curl -s -X POST http://localhost:3000/api/chat \
|
|
-H "Content-Type: application/json" \
|
|
-d "$PAYLOAD" \
|
|
--max-time 30 \
|
|
2>&1)
|
|
|
|
EXIT_CODE=$?
|
|
|
|
echo "Response:"
|
|
echo "========="
|
|
if [ $EXIT_CODE -eq 0 ]; then
|
|
if [ -z "$RESPONSE" ]; then
|
|
echo "⚠ Empty response received"
|
|
else
|
|
# Show first 100 lines of response
|
|
echo "$RESPONSE" | head -100
|
|
echo ""
|
|
LINE_COUNT=$(echo "$RESPONSE" | wc -l)
|
|
echo "Total lines: $LINE_COUNT"
|
|
echo "Response length: $(echo "$RESPONSE" | wc -c) bytes"
|
|
fi
|
|
else
|
|
echo "✗ Request failed with exit code: $EXIT_CODE"
|
|
echo "$RESPONSE"
|
|
fi
|
|
|
|
echo ""
|
|
echo "========================================"
|