Spaces:
Running
Running
File size: 4,729 Bytes
598105d |
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# π HackRx 6.0 - Testing Guide
## β
**WORKING URLs**
Your app is now successfully deployed and accessible at:
### **Main App URLs:**
- **Root**: https://Manjesh501-hackrx.hf.space
- **Health Check**: https://Manjesh501-hackrx.hf.space/health
- **Test Endpoint**: https://Manjesh501-hackrx.hf.space/test
- **API Documentation**: https://Manjesh501-hackrx.hf.space/docs
### **API Endpoints:**
- **Main Query**: https://Manjesh501-hackrx.hf.space/api/v1/hackrx/run
- **Legacy Query**: https://Manjesh501-hackrx.hf.space/hackrx/run
- **Detailed Query**: https://Manjesh501-hackrx.hf.space/api/v1/hackrx/run/detailed
- **Analyze Document**: https://Manjesh501-hackrx.hf.space/api/v1/analyze-document
- **Summarize Document**: https://Manjesh501-hackrx.hf.space/api/v1/summarize-document
## π§ͺ **Testing Steps**
### **1. Basic Endpoint Tests**
**Test Root Endpoint:**
```bash
curl https://Manjesh501-hackrx.hf.space/
```
**Expected Response:**
```json
{
"message": "HackRx 6.0 - Intelligent Query-Retrieval System",
"version": "1.0.0",
"status": "running",
"endpoints": {
"main": "api/v1/hackrx/run",
"legacy": "hackrx/run",
"detailed": "api/v1/hackrx/run/detailed",
"health": "health",
"docs": "docs",
"test": "test"
}
}
```
**Test Health Endpoint:**
```bash
curl https://Manjesh501-hackrx.hf.space/health
```
**Expected Response:**
```json
{
"status": "healthy",
"message": "HackRx 6.0 is running",
"services": {
"query_service": true,
"embedding_service": true,
"llm_service": true,
"pinecone_service": false
}
}
```
**Test Endpoint:**
```bash
curl https://Manjesh501-hackrx.hf.space/test
```
**Expected Response:**
```json
{
"message": "Test endpoint working!",
"status": "success",
"app_loaded": true,
"mode": "app.py"
}
```
### **2. API Documentation Test**
Visit: https://Manjesh501-hackrx.hf.space/docs
You should see:
- β
Interactive API documentation
- β
All endpoints listed
- β
Request/response schemas
- β
"Try it out" functionality
### **3. Main API Tests**
**Test Main Query Endpoint:**
```bash
curl -X POST "https://Manjesh501-hackrx.hf.space/api/v1/hackrx/run" \
-H "Content-Type: application/json" \
-d '{
"documents": "https://example.com/document.pdf",
"questions": ["What is the main topic?"]
}'
```
**Test Legacy Query Endpoint:**
```bash
curl -X POST "https://Manjesh501-hackrx.hf.space/hackrx/run" \
-H "Content-Type: application/json" \
-d '{
"query": "What is the main topic?",
"document_url": "https://example.com/document.pdf"
}'
```
### **4. Browser Testing**
**Open these URLs in your browser:**
1. **Main App**: https://Manjesh501-hackrx.hf.space
- Should show app information and available endpoints
2. **Health Check**: https://Manjesh501-hackrx.hf.space/health
- Should show healthy status
3. **Test Endpoint**: https://Manjesh501-hackrx.hf.space/test
- Should show test success message
4. **API Docs**: https://Manjesh501-hackrx.hf.space/docs
- Should show interactive API documentation
## π― **What to Test**
### **β
Basic Functionality:**
- [ ] Root endpoint returns app info
- [ ] Health endpoint shows healthy status
- [ ] Test endpoint works
- [ ] API documentation loads
- [ ] All endpoints are accessible
### **β
API Functionality:**
- [ ] Main query endpoint accepts requests
- [ ] Legacy query endpoint works
- [ ] Document analysis endpoint functions
- [ ] Summarization endpoint works
- [ ] Error handling works properly
### **β
Performance:**
- [ ] Response times are reasonable
- [ ] No timeout errors
- [ ] Memory usage is stable
- [ ] Services initialize correctly
## π **How to Use Your App**
### **For Users:**
1. **Visit**: https://Manjesh501-hackrx.hf.space
2. **Read the documentation**: https://Manjesh501-hackrx.hf.space/docs
3. **Test the API**: Use the interactive docs to try endpoints
4. **Integrate**: Use the API endpoints in your applications
### **For Developers:**
1. **API Base URL**: `https://Manjesh501-hackrx.hf.space`
2. **Documentation**: Available at `/docs`
3. **Health Check**: Available at `/health`
4. **Main Endpoint**: `POST /api/v1/hackrx/run`
## π **Success Metrics**
Your deployment is successful if:
- β
All URLs return 200 OK
- β
API documentation loads completely
- β
Health endpoint shows all services as healthy
- β
No 404 or 500 errors
- β
Container logs show successful startup
## π **Congratulations!**
Your HackRx 6.0 app is now:
- β
**Successfully deployed** on Hugging Face Spaces
- β
**All endpoints working** correctly
- β
**API documentation** accessible
- β
**Ready for use** by users and developers
**Your app is live and working perfectly!** π |