Spaces:
Sleeping
Sleeping
IZERE HIRWA Roger
commited on
Commit
·
eeacc46
1
Parent(s):
c024705
add lg files
Browse files- .gitattributes +2 -0
- chatbot/admin.js +2 -2
- chatbot/admin_advanced.js +2 -2
- chatbot/config-ui.js +1 -1
- chatbot/config.js +4 -4
- chatbot/professional.js +1 -1
- chatbot/professional_advanced.js +2 -2
- install.py +1 -1
- tests/ADMIN_PROFESSIONAL_MANAGEMENT_UPDATE.md +2 -2
- tests/EMAIL_CONFIGURATION.md +1 -1
- tests/SMS_INTEGRATION_README.md +3 -3
- tests/THERAPY_BOOKING_README.md +1 -1
- tests/debug_forgot_password.html +1 -1
- tests/demo_booking_sms.py +1 -1
- tests/demo_sms_automation.py +1 -1
- tests/postman_examples.json +7 -7
- tests/sms_usage_example.py +1 -1
- tests/start_aimhsa.bat +1 -1
- tests/start_simple.bat +1 -1
- tests/test_admin_complete_flow.py +1 -1
- tests/test_admin_dashboard.html +3 -3
- tests/test_admin_form_functionality.py +1 -1
- tests/test_admin_professional_management.py +1 -1
- tests/test_all_booking_sms.py +1 -1
- tests/test_dashboard_simple.html +5 -5
- tests/test_enhanced_language_detection.py +1 -1
- tests/test_professional_api.py +3 -3
- tests/test_professional_form.html +1 -1
- tests/test_session_api.py +2 -2
- tests/test_simple_admin.py +1 -1
- tests/test_sms_integration.py +1 -1
- tests/test_user_information_flow.py +1 -1
- verify_sms_automation.py +1 -1
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.db filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.sqlite3 filter=lfs diff=lfs merge=lfs -text
|
chatbot/admin.js
CHANGED
|
@@ -13,10 +13,10 @@
|
|
| 13 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 14 |
return loc.origin;
|
| 15 |
} else {
|
| 16 |
-
return '
|
| 17 |
}
|
| 18 |
} catch (_) {
|
| 19 |
-
return '
|
| 20 |
}
|
| 21 |
};
|
| 22 |
|
|
|
|
| 13 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 14 |
return loc.origin;
|
| 15 |
} else {
|
| 16 |
+
return 'https://prodevroger-ishingiro.hf.space';
|
| 17 |
}
|
| 18 |
} catch (_) {
|
| 19 |
+
return 'https://prodevroger-ishingiro.hf.space';
|
| 20 |
}
|
| 21 |
};
|
| 22 |
|
chatbot/admin_advanced.js
CHANGED
|
@@ -21,10 +21,10 @@
|
|
| 21 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 22 |
apiRoot = loc.origin;
|
| 23 |
} else {
|
| 24 |
-
apiRoot = '
|
| 25 |
}
|
| 26 |
} catch (_) {
|
| 27 |
-
apiRoot = '
|
| 28 |
}
|
| 29 |
return apiRoot;
|
| 30 |
};
|
|
|
|
| 21 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 22 |
apiRoot = loc.origin;
|
| 23 |
} else {
|
| 24 |
+
apiRoot = 'https://prodevroger-ishingiro.hf.space';
|
| 25 |
}
|
| 26 |
} catch (_) {
|
| 27 |
+
apiRoot = 'https://prodevroger-ishingiro.hf.space';
|
| 28 |
}
|
| 29 |
return apiRoot;
|
| 30 |
};
|
chatbot/config-ui.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
| 39 |
<label>API Base URL</label>
|
| 40 |
<input type="url" id="apiBaseUrl" class="form-control"
|
| 41 |
value="${this.config?.getApiBaseUrl() || ''}"
|
| 42 |
-
placeholder="
|
| 43 |
<small class="form-text text-muted">
|
| 44 |
Base URL for the backend API server
|
| 45 |
</small>
|
|
|
|
| 39 |
<label>API Base URL</label>
|
| 40 |
<input type="url" id="apiBaseUrl" class="form-control"
|
| 41 |
value="${this.config?.getApiBaseUrl() || ''}"
|
| 42 |
+
placeholder="https://prodevroger-ishingiro.hf.space">
|
| 43 |
<small class="form-text text-muted">
|
| 44 |
Base URL for the backend API server
|
| 45 |
</small>
|
chatbot/config.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
| 10 |
const DEFAULT_CONFIG = {
|
| 11 |
// API Configuration
|
| 12 |
api: {
|
| 13 |
-
baseUrl: '
|
| 14 |
timeout: 10000,
|
| 15 |
retryAttempts: 3,
|
| 16 |
retryDelay: 1000
|
|
@@ -51,17 +51,17 @@
|
|
| 51 |
const ENVIRONMENT_CONFIGS = {
|
| 52 |
development: {
|
| 53 |
api: {
|
| 54 |
-
baseUrl: '
|
| 55 |
}
|
| 56 |
},
|
| 57 |
production: {
|
| 58 |
api: {
|
| 59 |
-
baseUrl: 'https://
|
| 60 |
}
|
| 61 |
},
|
| 62 |
staging: {
|
| 63 |
api: {
|
| 64 |
-
baseUrl: 'https://
|
| 65 |
}
|
| 66 |
}
|
| 67 |
};
|
|
|
|
| 10 |
const DEFAULT_CONFIG = {
|
| 11 |
// API Configuration
|
| 12 |
api: {
|
| 13 |
+
baseUrl: 'https://prodevroger-ishingiro.hf.space',
|
| 14 |
timeout: 10000,
|
| 15 |
retryAttempts: 3,
|
| 16 |
retryDelay: 1000
|
|
|
|
| 51 |
const ENVIRONMENT_CONFIGS = {
|
| 52 |
development: {
|
| 53 |
api: {
|
| 54 |
+
baseUrl: 'https://prodevroger-ishingiro.hf.space'
|
| 55 |
}
|
| 56 |
},
|
| 57 |
production: {
|
| 58 |
api: {
|
| 59 |
+
baseUrl: 'https://prodevroger-ishingiro.hf.space'
|
| 60 |
}
|
| 61 |
},
|
| 62 |
staging: {
|
| 63 |
api: {
|
| 64 |
+
baseUrl: 'https://prodevroger-ishingiro.hf.space'
|
| 65 |
}
|
| 66 |
}
|
| 67 |
};
|
chatbot/professional.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 15 |
return loc.origin;
|
| 16 |
} else {
|
| 17 |
-
return '
|
| 18 |
}
|
| 19 |
};
|
| 20 |
|
|
|
|
| 14 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 15 |
return loc.origin;
|
| 16 |
} else {
|
| 17 |
+
return 'https://prodevroger-ishingiro.hf.space';
|
| 18 |
}
|
| 19 |
};
|
| 20 |
|
chatbot/professional_advanced.js
CHANGED
|
@@ -15,10 +15,10 @@
|
|
| 15 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 16 |
apiRoot = loc.origin;
|
| 17 |
} else {
|
| 18 |
-
apiRoot = '
|
| 19 |
}
|
| 20 |
} catch (_) {
|
| 21 |
-
apiRoot = '
|
| 22 |
}
|
| 23 |
const API_ROOT = apiRoot;
|
| 24 |
|
|
|
|
| 15 |
} else if (loc.port === '5057' || loc.port === '') {
|
| 16 |
apiRoot = loc.origin;
|
| 17 |
} else {
|
| 18 |
+
apiRoot = 'https://prodevroger-ishingiro.hf.space';
|
| 19 |
}
|
| 20 |
} catch (_) {
|
| 21 |
+
apiRoot = 'https://prodevroger-ishingiro.hf.space';
|
| 22 |
}
|
| 23 |
const API_ROOT = apiRoot;
|
| 24 |
|
install.py
CHANGED
|
@@ -75,7 +75,7 @@ def main():
|
|
| 75 |
print("\n🔑 Next steps:")
|
| 76 |
print("1. Update your API keys in .env file")
|
| 77 |
print("2. Run: python app.py")
|
| 78 |
-
print("3. Open:
|
| 79 |
|
| 80 |
return True
|
| 81 |
|
|
|
|
| 75 |
print("\n🔑 Next steps:")
|
| 76 |
print("1. Update your API keys in .env file")
|
| 77 |
print("2. Run: python app.py")
|
| 78 |
+
print("3. Open: https://prodevroger-ishingiro.hf.space")
|
| 79 |
|
| 80 |
return True
|
| 81 |
|
tests/ADMIN_PROFESSIONAL_MANAGEMENT_UPDATE.md
CHANGED
|
@@ -154,7 +154,7 @@ def delete_professional(prof_id: int):
|
|
| 154 |
|
| 155 |
#### **Update Professional**
|
| 156 |
```bash
|
| 157 |
-
curl -X PUT
|
| 158 |
-H "Content-Type: application/json" \
|
| 159 |
-d '{
|
| 160 |
"first_name": "Dr. Jane",
|
|
@@ -166,7 +166,7 @@ curl -X PUT http://localhost:5057/admin/professionals/1 \
|
|
| 166 |
|
| 167 |
#### **Delete Professional**
|
| 168 |
```bash
|
| 169 |
-
curl -X DELETE
|
| 170 |
```
|
| 171 |
|
| 172 |
## ✅ **Implementation Status**
|
|
|
|
| 154 |
|
| 155 |
#### **Update Professional**
|
| 156 |
```bash
|
| 157 |
+
curl -X PUT https://prodevroger-ishingiro.hf.space/admin/professionals/1 \
|
| 158 |
-H "Content-Type: application/json" \
|
| 159 |
-d '{
|
| 160 |
"first_name": "Dr. Jane",
|
|
|
|
| 166 |
|
| 167 |
#### **Delete Professional**
|
| 168 |
```bash
|
| 169 |
+
curl -X DELETE https://prodevroger-ishingiro.hf.space/admin/professionals/1
|
| 170 |
```
|
| 171 |
|
| 172 |
## ✅ **Implementation Status**
|
tests/EMAIL_CONFIGURATION.md
CHANGED
|
@@ -92,7 +92,7 @@ After creating the `.env` file:
|
|
| 92 |
|
| 93 |
```bash
|
| 94 |
# Test with curl
|
| 95 |
-
curl -X POST
|
| 96 |
-H "Content-Type: application/json" \
|
| 97 |
-d '{"email": "test@example.com"}'
|
| 98 |
```
|
|
|
|
| 92 |
|
| 93 |
```bash
|
| 94 |
# Test with curl
|
| 95 |
+
curl -X POST https://prodevroger-ishingiro.hf.space/forgot_password \
|
| 96 |
-H "Content-Type: application/json" \
|
| 97 |
-d '{"email": "test@example.com"}'
|
| 98 |
```
|
tests/SMS_INTEGRATION_README.md
CHANGED
|
@@ -101,19 +101,19 @@ This will test:
|
|
| 101 |
|
| 102 |
#### Test SMS Service Status
|
| 103 |
```bash
|
| 104 |
-
curl -X GET
|
| 105 |
```
|
| 106 |
|
| 107 |
#### Send Test SMS
|
| 108 |
```bash
|
| 109 |
-
curl -X POST
|
| 110 |
-H "Content-Type: application/json" \
|
| 111 |
-d '{"phone": "+250788123456", "message": "Test message"}'
|
| 112 |
```
|
| 113 |
|
| 114 |
#### Send Booking Notification
|
| 115 |
```bash
|
| 116 |
-
curl -X POST
|
| 117 |
-H "Content-Type: application/json" \
|
| 118 |
-d '{"booking_id": "your-booking-id"}'
|
| 119 |
```
|
|
|
|
| 101 |
|
| 102 |
#### Test SMS Service Status
|
| 103 |
```bash
|
| 104 |
+
curl -X GET https://prodevroger-ishingiro.hf.space/admin/sms/status
|
| 105 |
```
|
| 106 |
|
| 107 |
#### Send Test SMS
|
| 108 |
```bash
|
| 109 |
+
curl -X POST https://prodevroger-ishingiro.hf.space/admin/sms/test \
|
| 110 |
-H "Content-Type: application/json" \
|
| 111 |
-d '{"phone": "+250788123456", "message": "Test message"}'
|
| 112 |
```
|
| 113 |
|
| 114 |
#### Send Booking Notification
|
| 115 |
```bash
|
| 116 |
+
curl -X POST https://prodevroger-ishingiro.hf.space/admin/sms/send-booking-notification \
|
| 117 |
-H "Content-Type: application/json" \
|
| 118 |
-d '{"booking_id": "your-booking-id"}'
|
| 119 |
```
|
tests/THERAPY_BOOKING_README.md
CHANGED
|
@@ -82,7 +82,7 @@ AIMHSA is an advanced AI-powered mental health support system specifically desig
|
|
| 82 |
5. **Start Backend**
|
| 83 |
```bash
|
| 84 |
python app.py
|
| 85 |
-
# Runs on
|
| 86 |
```
|
| 87 |
|
| 88 |
5. **Start Frontend**
|
|
|
|
| 82 |
5. **Start Backend**
|
| 83 |
```bash
|
| 84 |
python app.py
|
| 85 |
+
# Runs on https://prodevroger-ishingiro.hf.space
|
| 86 |
```
|
| 87 |
|
| 88 |
5. **Start Frontend**
|
tests/debug_forgot_password.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<script>
|
| 24 |
-
const API_ROOT = '
|
| 25 |
|
| 26 |
async function api(path, opts) {
|
| 27 |
const url = API_ROOT + path;
|
|
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<script>
|
| 24 |
+
const API_ROOT = 'https://prodevroger-ishingiro.hf.space';
|
| 25 |
|
| 26 |
async function api(path, opts) {
|
| 27 |
const url = API_ROOT + path;
|
tests/demo_booking_sms.py
CHANGED
|
@@ -7,7 +7,7 @@ import requests
|
|
| 7 |
import json
|
| 8 |
import time
|
| 9 |
|
| 10 |
-
API_BASE_URL = "
|
| 11 |
|
| 12 |
def demo_automatic_booking_sms():
|
| 13 |
"""Demo: Automatic booking with SMS"""
|
|
|
|
| 7 |
import json
|
| 8 |
import time
|
| 9 |
|
| 10 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 11 |
|
| 12 |
def demo_automatic_booking_sms():
|
| 13 |
"""Demo: Automatic booking with SMS"""
|
tests/demo_sms_automation.py
CHANGED
|
@@ -8,7 +8,7 @@ import json
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
-
API_BASE_URL = "
|
| 12 |
|
| 13 |
def demo_sms_automation():
|
| 14 |
"""Demonstrate SMS automation with a real example"""
|
|
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 12 |
|
| 13 |
def demo_sms_automation():
|
| 14 |
"""Demonstrate SMS automation with a real example"""
|
tests/postman_examples.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"register": {
|
| 3 |
-
"url": "
|
| 4 |
"method": "POST",
|
| 5 |
"body_json": {
|
| 6 |
"username": "alice",
|
|
@@ -9,7 +9,7 @@
|
|
| 9 |
"notes": "POST JSON in Body -> raw -> application/json"
|
| 10 |
},
|
| 11 |
"login": {
|
| 12 |
-
"url": "
|
| 13 |
"method": "POST",
|
| 14 |
"body_json": {
|
| 15 |
"username": "alice",
|
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"notes": "On success server returns { ok: true, account: \"alice\" }"
|
| 19 |
},
|
| 20 |
"create_conversation": {
|
| 21 |
-
"url": "
|
| 22 |
"method": "POST",
|
| 23 |
"body_json": {
|
| 24 |
"account": "alice"
|
|
@@ -26,13 +26,13 @@
|
|
| 26 |
"notes": "Requires authenticated account; server returns { id: \"<conv_id>\", new: true }"
|
| 27 |
},
|
| 28 |
"list_conversations": {
|
| 29 |
-
"url": "
|
| 30 |
"method": "GET",
|
| 31 |
"body_json": null,
|
| 32 |
"notes": "GET — returns { conversations: [ { id, preview, timestamp }, ... ] }"
|
| 33 |
},
|
| 34 |
"session": {
|
| 35 |
-
"url": "
|
| 36 |
"method": "POST",
|
| 37 |
"body_json": {
|
| 38 |
"account": "alice"
|
|
@@ -40,7 +40,7 @@
|
|
| 40 |
"notes": "Use account for account-bound session, or omit account for IP-bound session"
|
| 41 |
},
|
| 42 |
"ask": {
|
| 43 |
-
"url": "
|
| 44 |
"method": "POST",
|
| 45 |
"body_json": {
|
| 46 |
"id": "<conv_id_or_omit_to_create>",
|
|
@@ -52,6 +52,6 @@
|
|
| 52 |
},
|
| 53 |
"upload_pdf_curl_example": {
|
| 54 |
"notes": "Use multipart/form-data; in Postman choose 'form-data' with key 'file' (type: file), optional 'id' and 'question'",
|
| 55 |
-
"curl": "curl -X POST \"
|
| 56 |
}
|
| 57 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"register": {
|
| 3 |
+
"url": "https://prodevroger-ishingiro.hf.space/register",
|
| 4 |
"method": "POST",
|
| 5 |
"body_json": {
|
| 6 |
"username": "alice",
|
|
|
|
| 9 |
"notes": "POST JSON in Body -> raw -> application/json"
|
| 10 |
},
|
| 11 |
"login": {
|
| 12 |
+
"url": "https://prodevroger-ishingiro.hf.space/login",
|
| 13 |
"method": "POST",
|
| 14 |
"body_json": {
|
| 15 |
"username": "alice",
|
|
|
|
| 18 |
"notes": "On success server returns { ok: true, account: \"alice\" }"
|
| 19 |
},
|
| 20 |
"create_conversation": {
|
| 21 |
+
"url": "https://prodevroger-ishingiro.hf.space/conversations",
|
| 22 |
"method": "POST",
|
| 23 |
"body_json": {
|
| 24 |
"account": "alice"
|
|
|
|
| 26 |
"notes": "Requires authenticated account; server returns { id: \"<conv_id>\", new: true }"
|
| 27 |
},
|
| 28 |
"list_conversations": {
|
| 29 |
+
"url": "https://prodevroger-ishingiro.hf.space/conversations?account=alice",
|
| 30 |
"method": "GET",
|
| 31 |
"body_json": null,
|
| 32 |
"notes": "GET — returns { conversations: [ { id, preview, timestamp }, ... ] }"
|
| 33 |
},
|
| 34 |
"session": {
|
| 35 |
+
"url": "https://prodevroger-ishingiro.hf.space/session",
|
| 36 |
"method": "POST",
|
| 37 |
"body_json": {
|
| 38 |
"account": "alice"
|
|
|
|
| 40 |
"notes": "Use account for account-bound session, or omit account for IP-bound session"
|
| 41 |
},
|
| 42 |
"ask": {
|
| 43 |
+
"url": "https://prodevroger-ishingiro.hf.space/ask",
|
| 44 |
"method": "POST",
|
| 45 |
"body_json": {
|
| 46 |
"id": "<conv_id_or_omit_to_create>",
|
|
|
|
| 52 |
},
|
| 53 |
"upload_pdf_curl_example": {
|
| 54 |
"notes": "Use multipart/form-data; in Postman choose 'form-data' with key 'file' (type: file), optional 'id' and 'question'",
|
| 55 |
+
"curl": "curl -X POST \"https://prodevroger-ishingiro.hf.space/upload_pdf\" -F \"file=@/path/to/doc.pdf\" -F \"account=alice\" -F \"question=Summarize this PDF\""
|
| 56 |
}
|
| 57 |
}
|
tests/sms_usage_example.py
CHANGED
|
@@ -9,7 +9,7 @@ import json
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
-
API_BASE_URL = "
|
| 13 |
|
| 14 |
def example_booking_with_sms():
|
| 15 |
"""
|
|
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 13 |
|
| 14 |
def example_booking_with_sms():
|
| 15 |
"""
|
tests/start_aimhsa.bat
CHANGED
|
@@ -4,7 +4,7 @@ echo AIMHSA - AI Mental Health Support Assistant
|
|
| 4 |
echo ================================================
|
| 5 |
echo.
|
| 6 |
echo Starting AIMHSA system...
|
| 7 |
-
echo Backend API:
|
| 8 |
echo Frontend: http://localhost:8000
|
| 9 |
echo.
|
| 10 |
echo Press Ctrl+C to stop both services
|
|
|
|
| 4 |
echo ================================================
|
| 5 |
echo.
|
| 6 |
echo Starting AIMHSA system...
|
| 7 |
+
echo Backend API: https://prodevroger-ishingiro.hf.space
|
| 8 |
echo Frontend: http://localhost:8000
|
| 9 |
echo.
|
| 10 |
echo Press Ctrl+C to stop both services
|
tests/start_simple.bat
CHANGED
|
@@ -4,7 +4,7 @@ echo AIMHSA Simple Launcher
|
|
| 4 |
echo ================================================
|
| 5 |
echo.
|
| 6 |
echo Starting simplified AIMHSA system...
|
| 7 |
-
echo Backend API:
|
| 8 |
echo Frontend: http://localhost:8000
|
| 9 |
echo.
|
| 10 |
|
|
|
|
| 4 |
echo ================================================
|
| 5 |
echo.
|
| 6 |
echo Starting simplified AIMHSA system...
|
| 7 |
+
echo Backend API: https://prodevroger-ishingiro.hf.space
|
| 8 |
echo Frontend: http://localhost:8000
|
| 9 |
echo.
|
| 10 |
|
tests/test_admin_complete_flow.py
CHANGED
|
@@ -9,7 +9,7 @@ import json
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
-
API_BASE_URL = "
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
|
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
tests/test_admin_dashboard.html
CHANGED
|
@@ -65,9 +65,9 @@
|
|
| 65 |
function testAPIEndpoints() {
|
| 66 |
const result = document.getElementById('api-result');
|
| 67 |
const endpoints = [
|
| 68 |
-
'
|
| 69 |
-
'
|
| 70 |
-
'
|
| 71 |
];
|
| 72 |
|
| 73 |
let results = [];
|
|
|
|
| 65 |
function testAPIEndpoints() {
|
| 66 |
const result = document.getElementById('api-result');
|
| 67 |
const endpoints = [
|
| 68 |
+
'https://prodevroger-ishingiro.hf.space/admin/bookings',
|
| 69 |
+
'https://prodevroger-ishingiro.hf.space/admin/professionals',
|
| 70 |
+
'https://prodevroger-ishingiro.hf.space/admin/risk-assessments'
|
| 71 |
];
|
| 72 |
|
| 73 |
let results = [];
|
tests/test_admin_form_functionality.py
CHANGED
|
@@ -9,7 +9,7 @@ import json
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
-
API_BASE_URL = "
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
|
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
tests/test_admin_professional_management.py
CHANGED
|
@@ -9,7 +9,7 @@ import json
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
-
API_BASE_URL = "
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
|
|
|
| 9 |
import time
|
| 10 |
|
| 11 |
# Configuration
|
| 12 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 13 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 14 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 15 |
|
tests/test_all_booking_sms.py
CHANGED
|
@@ -8,7 +8,7 @@ import json
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
-
API_BASE_URL = "
|
| 12 |
|
| 13 |
def test_automatic_booking_sms():
|
| 14 |
"""Test SMS for automatic high-risk bookings"""
|
|
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 12 |
|
| 13 |
def test_automatic_booking_sms():
|
| 14 |
"""Test SMS for automatic high-risk bookings"""
|
tests/test_dashboard_simple.html
CHANGED
|
@@ -97,10 +97,10 @@
|
|
| 97 |
result.innerHTML = '<div class="loading">🔄 Testing API connectivity...</div>';
|
| 98 |
|
| 99 |
const endpoints = [
|
| 100 |
-
{ name: 'Admin Bookings', url: '
|
| 101 |
-
{ name: 'Admin Professionals', url: '
|
| 102 |
-
{ name: 'Admin Risk Assessments', url: '
|
| 103 |
-
{ name: 'Monitor Risk Stats', url: '
|
| 104 |
];
|
| 105 |
|
| 106 |
let results = [];
|
|
@@ -135,7 +135,7 @@
|
|
| 135 |
result.innerHTML = '<div class="loading">🔄 Testing database schema...</div>';
|
| 136 |
|
| 137 |
// Test if we can get data from the database through API
|
| 138 |
-
fetch('
|
| 139 |
.then(response => response.json())
|
| 140 |
.then(data => {
|
| 141 |
if (data.professionals && Array.isArray(data.professionals)) {
|
|
|
|
| 97 |
result.innerHTML = '<div class="loading">🔄 Testing API connectivity...</div>';
|
| 98 |
|
| 99 |
const endpoints = [
|
| 100 |
+
{ name: 'Admin Bookings', url: 'https://prodevroger-ishingiro.hf.space/admin/bookings' },
|
| 101 |
+
{ name: 'Admin Professionals', url: 'https://prodevroger-ishingiro.hf.space/admin/professionals' },
|
| 102 |
+
{ name: 'Admin Risk Assessments', url: 'https://prodevroger-ishingiro.hf.space/admin/risk-assessments' },
|
| 103 |
+
{ name: 'Monitor Risk Stats', url: 'https://prodevroger-ishingiro.hf.space/monitor/risk-stats' }
|
| 104 |
];
|
| 105 |
|
| 106 |
let results = [];
|
|
|
|
| 135 |
result.innerHTML = '<div class="loading">🔄 Testing database schema...</div>';
|
| 136 |
|
| 137 |
// Test if we can get data from the database through API
|
| 138 |
+
fetch('https://prodevroger-ishingiro.hf.space/admin/professionals')
|
| 139 |
.then(response => response.json())
|
| 140 |
.then(data => {
|
| 141 |
if (data.professionals && Array.isArray(data.professionals)) {
|
tests/test_enhanced_language_detection.py
CHANGED
|
@@ -10,7 +10,7 @@ import time
|
|
| 10 |
def test_language_detection_accuracy():
|
| 11 |
"""Test the chatbot with various language inputs to verify accuracy"""
|
| 12 |
|
| 13 |
-
base_url = "
|
| 14 |
|
| 15 |
# Comprehensive test cases with different languages and scenarios
|
| 16 |
test_cases = [
|
|
|
|
| 10 |
def test_language_detection_accuracy():
|
| 11 |
"""Test the chatbot with various language inputs to verify accuracy"""
|
| 12 |
|
| 13 |
+
base_url = "https://prodevroger-ishingiro.hf.space"
|
| 14 |
|
| 15 |
# Comprehensive test cases with different languages and scenarios
|
| 16 |
test_cases = [
|
tests/test_professional_api.py
CHANGED
|
@@ -3,7 +3,7 @@ import json
|
|
| 3 |
|
| 4 |
# Test the professional sessions endpoint
|
| 5 |
try:
|
| 6 |
-
response = requests.get('
|
| 7 |
print('=== PROFESSIONAL SESSIONS ===')
|
| 8 |
print(f'Status: {response.status_code}')
|
| 9 |
if response.status_code == 200:
|
|
@@ -18,7 +18,7 @@ except Exception as e:
|
|
| 18 |
|
| 19 |
print('\n=== PROFESSIONAL USERS ===')
|
| 20 |
try:
|
| 21 |
-
response = requests.get('
|
| 22 |
print(f'Status: {response.status_code}')
|
| 23 |
if response.status_code == 200:
|
| 24 |
data = response.json()
|
|
@@ -32,7 +32,7 @@ except Exception as e:
|
|
| 32 |
|
| 33 |
print('\n=== DASHBOARD STATS ===')
|
| 34 |
try:
|
| 35 |
-
response = requests.get('
|
| 36 |
print(f'Status: {response.status_code}')
|
| 37 |
if response.status_code == 200:
|
| 38 |
data = response.json()
|
|
|
|
| 3 |
|
| 4 |
# Test the professional sessions endpoint
|
| 5 |
try:
|
| 6 |
+
response = requests.get('https://prodevroger-ishingiro.hf.space/professional/sessions')
|
| 7 |
print('=== PROFESSIONAL SESSIONS ===')
|
| 8 |
print(f'Status: {response.status_code}')
|
| 9 |
if response.status_code == 200:
|
|
|
|
| 18 |
|
| 19 |
print('\n=== PROFESSIONAL USERS ===')
|
| 20 |
try:
|
| 21 |
+
response = requests.get('https://prodevroger-ishingiro.hf.space/professional/users')
|
| 22 |
print(f'Status: {response.status_code}')
|
| 23 |
if response.status_code == 200:
|
| 24 |
data = response.json()
|
|
|
|
| 32 |
|
| 33 |
print('\n=== DASHBOARD STATS ===')
|
| 34 |
try:
|
| 35 |
+
response = requests.get('https://prodevroger-ishingiro.hf.space/professional/dashboard-stats')
|
| 36 |
print(f'Status: {response.status_code}')
|
| 37 |
if response.status_code == 200:
|
| 38 |
data = response.json()
|
tests/test_professional_form.html
CHANGED
|
@@ -279,7 +279,7 @@
|
|
| 279 |
|
| 280 |
function testAPI() {
|
| 281 |
console.log('🧪 Testing API Connection...');
|
| 282 |
-
fetch('
|
| 283 |
.then(response => {
|
| 284 |
if (response.ok) {
|
| 285 |
addResult('✅ API connection successful');
|
|
|
|
| 279 |
|
| 280 |
function testAPI() {
|
| 281 |
console.log('🧪 Testing API Connection...');
|
| 282 |
+
fetch('https://prodevroger-ishingiro.hf.space/admin/professionals')
|
| 283 |
.then(response => {
|
| 284 |
if (response.ok) {
|
| 285 |
addResult('✅ API connection successful');
|
tests/test_session_api.py
CHANGED
|
@@ -14,7 +14,7 @@ def test_session_details_api():
|
|
| 14 |
professional_id = "1" # Jean Ntwari
|
| 15 |
|
| 16 |
# API endpoint
|
| 17 |
-
url = f"
|
| 18 |
|
| 19 |
# Headers
|
| 20 |
headers = {
|
|
@@ -75,7 +75,7 @@ def test_session_details_api():
|
|
| 75 |
|
| 76 |
except requests.exceptions.ConnectionError:
|
| 77 |
print("❌ Connection Error: Could not connect to the API server")
|
| 78 |
-
print("Make sure the Flask app is running on
|
| 79 |
except Exception as e:
|
| 80 |
print(f"❌ Unexpected Error: {e}")
|
| 81 |
|
|
|
|
| 14 |
professional_id = "1" # Jean Ntwari
|
| 15 |
|
| 16 |
# API endpoint
|
| 17 |
+
url = f"https://prodevroger-ishingiro.hf.space/professional/sessions/{booking_id}"
|
| 18 |
|
| 19 |
# Headers
|
| 20 |
headers = {
|
|
|
|
| 75 |
|
| 76 |
except requests.exceptions.ConnectionError:
|
| 77 |
print("❌ Connection Error: Could not connect to the API server")
|
| 78 |
+
print("Make sure the Flask app is running on https://prodevroger-ishingiro.hf.space")
|
| 79 |
except Exception as e:
|
| 80 |
print(f"❌ Unexpected Error: {e}")
|
| 81 |
|
tests/test_simple_admin.py
CHANGED
|
@@ -8,7 +8,7 @@ import requests
|
|
| 8 |
import json
|
| 9 |
|
| 10 |
# Configuration
|
| 11 |
-
API_BASE_URL = "
|
| 12 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 13 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 14 |
|
|
|
|
| 8 |
import json
|
| 9 |
|
| 10 |
# Configuration
|
| 11 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 12 |
ADMIN_EMAIL = "eliasfeza@gmail.com"
|
| 13 |
ADMIN_PASSWORD = "EliasFeza@12301"
|
| 14 |
|
tests/test_sms_integration.py
CHANGED
|
@@ -10,7 +10,7 @@ import time
|
|
| 10 |
import sys
|
| 11 |
|
| 12 |
# Configuration
|
| 13 |
-
API_BASE_URL = "
|
| 14 |
SMS_API_ID = "HDEV-23fb1b59-aec0-4aef-a351-bfc1c3aa3c52-ID"
|
| 15 |
SMS_API_KEY = "HDEV-6e36c286-19bb-4b45-838e-8b5cd0240857-KEY"
|
| 16 |
|
|
|
|
| 10 |
import sys
|
| 11 |
|
| 12 |
# Configuration
|
| 13 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 14 |
SMS_API_ID = "HDEV-23fb1b59-aec0-4aef-a351-bfc1c3aa3c52-ID"
|
| 15 |
SMS_API_KEY = "HDEV-6e36c286-19bb-4b45-838e-8b5cd0240857-KEY"
|
| 16 |
|
tests/test_user_information_flow.py
CHANGED
|
@@ -11,7 +11,7 @@ import uuid
|
|
| 11 |
from typing import Dict, Optional
|
| 12 |
|
| 13 |
# Configuration
|
| 14 |
-
API_BASE = "
|
| 15 |
|
| 16 |
def test_api_endpoint(method: str, endpoint: str, data: Optional[Dict] = None, expected_status: int = 200) -> Optional[Dict]:
|
| 17 |
"""Test an API endpoint and return the response"""
|
|
|
|
| 11 |
from typing import Dict, Optional
|
| 12 |
|
| 13 |
# Configuration
|
| 14 |
+
API_BASE = "https://prodevroger-ishingiro.hf.space"
|
| 15 |
|
| 16 |
def test_api_endpoint(method: str, endpoint: str, data: Optional[Dict] = None, expected_status: int = 200) -> Optional[Dict]:
|
| 17 |
"""Test an API endpoint and return the response"""
|
verify_sms_automation.py
CHANGED
|
@@ -8,7 +8,7 @@ import json
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
-
API_BASE_URL = "
|
| 12 |
|
| 13 |
def test_automatic_sms_flow():
|
| 14 |
"""Test the complete automatic SMS flow"""
|
|
|
|
| 8 |
import time
|
| 9 |
import sys
|
| 10 |
|
| 11 |
+
API_BASE_URL = "https://prodevroger-ishingiro.hf.space"
|
| 12 |
|
| 13 |
def test_automatic_sms_flow():
|
| 14 |
"""Test the complete automatic SMS flow"""
|