Spaces:
Runtime error
Runtime error
Commit
·
6a8dfb0
1
Parent(s):
7e3820c
Updated system status response.
Browse files- main/schemas.py +17 -6
main/schemas.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import json
|
| 2 |
from pathlib import Path
|
| 3 |
from pydantic import BaseModel, Field, create_model, ConfigDict
|
| 4 |
-
from typing import List, Optional, Dict,
|
| 5 |
from time import time
|
| 6 |
|
| 7 |
class QueryExpansionRequest(BaseModel):
|
|
@@ -107,12 +107,23 @@ class ModelStatusInfo(BaseModel):
|
|
| 107 |
embedding_model: EmbeddingModelStatus
|
| 108 |
|
| 109 |
class SystemStatusResponse(BaseModel):
|
| 110 |
-
"""Pydantic model for system status response"""
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
storage: Optional[Dict[str, str]] = None
|
| 115 |
-
|
|
|
|
|
|
|
| 116 |
|
| 117 |
class ValidationResponse(BaseModel):
|
| 118 |
config_validation: Dict[str, bool]
|
|
|
|
| 1 |
import json
|
| 2 |
from pathlib import Path
|
| 3 |
from pydantic import BaseModel, Field, create_model, ConfigDict
|
| 4 |
+
from typing import List, Optional, Dict, Any
|
| 5 |
from time import time
|
| 6 |
|
| 7 |
class QueryExpansionRequest(BaseModel):
|
|
|
|
| 107 |
embedding_model: EmbeddingModelStatus
|
| 108 |
|
| 109 |
class SystemStatusResponse(BaseModel):
|
| 110 |
+
"""Pydantic model for comprehensive system status response"""
|
| 111 |
+
|
| 112 |
+
os: Dict[str, Any]
|
| 113 |
+
cpu: Dict[str, Any]
|
| 114 |
+
memory: Dict[str, Any]
|
| 115 |
+
gpus: List[Dict[str, Any]]
|
| 116 |
+
cuda_available: bool
|
| 117 |
+
cuda_version: Optional[str] = None
|
| 118 |
+
gpu_count: int
|
| 119 |
+
gpu_total: Optional[Dict[str, Any]] = None
|
| 120 |
+
gpu_error: Optional[str] = None
|
| 121 |
+
|
| 122 |
+
# Storage information - unchanged
|
| 123 |
storage: Optional[Dict[str, str]] = None
|
| 124 |
+
|
| 125 |
+
# Model information - might need type adjustment
|
| 126 |
+
model: Optional[ModelStatusInfo] = None
|
| 127 |
|
| 128 |
class ValidationResponse(BaseModel):
|
| 129 |
config_validation: Dict[str, bool]
|