Spaces:
Sleeping
Sleeping
Tanuj commited on
Commit ·
86ef927
1
Parent(s): d483948
Create schemas.py
Browse files- src/schemas.py +25 -0
src/schemas.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import TypedDict, Dict, Any
|
| 2 |
+
|
| 3 |
+
class StorageUsage(TypedDict):
|
| 4 |
+
bytes_used: int
|
| 5 |
+
metadata_bytes_used: int
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class UploadResult(TypedDict):
|
| 9 |
+
id: str
|
| 10 |
+
metadata: Dict[str, Any] # NOTE: Should not need this field
|
| 11 |
+
storage_usage: StorageUsage
|
| 12 |
+
|
| 13 |
+
class VectaraDocument(TypedDict):
|
| 14 |
+
id: str
|
| 15 |
+
metadata: Dict[str, Any]
|
| 16 |
+
# tables: list[Dict[str, Any]]
|
| 17 |
+
# parts: list[Dict[str, Any]] # NOTE: Only available when by list ID
|
| 18 |
+
# storage_usage: StorageUsage
|
| 19 |
+
# extraction_usage: Dict[str, Any]
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class VectaraDocuments(TypedDict):
|
| 23 |
+
documents: list[VectaraDocument]
|
| 24 |
+
# metadata: Dict[str, Any]
|
| 25 |
+
# page_key: str
|