Files
gooseek/test-chat-proper.sh
home 06fe57c765 feat: Go backend, enhanced search, new widgets, Docker deploy
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
2026-02-27 04:15:32 +03:00

71 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
echo "Testing GooSeek Chat Functionality"
echo "===================================="
echo ""
# Generate unique IDs
MESSAGE_ID="msg-$(date +%s)-$$"
CHAT_ID="chat-$(date +%s)-$$"
# Create the request payload
PAYLOAD=$(cat <<EOF
{
"message": {
"messageId": "$MESSAGE_ID",
"chatId": "$CHAT_ID",
"content": "Привет, как дела?"
},
"optimizationMode": "balanced",
"sources": [],
"history": [],
"files": [],
"chatModel": {
"providerId": "openai",
"key": "gpt-4o-mini"
},
"embeddingModel": {
"providerId": "",
"key": ""
},
"systemInstructions": "",
"locale": "ru",
"answerMode": "standard",
"learningMode": false
}
EOF
)
echo "Sending chat request..."
echo "Message: Привет, как дела?"
echo "Chat ID: $CHAT_ID"
echo "Message ID: $MESSAGE_ID"
echo ""
# Send request and capture response
RESPONSE=$(curl -s -X POST http://localhost:3015/api/chat \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
--max-time 30 \
2>&1)
EXIT_CODE=$?
echo "Response received:"
echo "=================="
if [ $EXIT_CODE -eq 0 ]; then
if [ -z "$RESPONSE" ]; then
echo "⚠ Empty response received"
else
echo "$RESPONSE" | head -50
echo ""
echo "Response length: $(echo "$RESPONSE" | wc -c) bytes"
fi
else
echo "✗ Request failed with exit code: $EXIT_CODE"
echo "$RESPONSE"
fi
echo ""
echo "===================================="