Spaces:
Runtime error
Runtime error
Commit
·
02ca405
1
Parent(s):
c902ef2
deploy
Browse files
__init__.py
DELETED
|
File without changes
|
__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (130 Bytes). View file
|
|
|
__pycache__/main.cpython-313.pyc
CHANGED
|
Binary files a/__pycache__/main.cpython-313.pyc and b/__pycache__/main.cpython-313.pyc differ
|
|
|
models/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (137 Bytes). View file
|
|
|
schemas/schema.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
from pydantic import BaseModel
|
| 2 |
-
from typing import List
|
| 3 |
|
| 4 |
class SMSRequest(BaseModel):
|
| 5 |
messages: List[str]
|
|
@@ -8,14 +8,14 @@ class EmbeddingResponse(BaseModel):
|
|
| 8 |
dimensions: int
|
| 9 |
embeddings: List[List[float]]
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
json_schema_extra = {
|
| 14 |
"example": {
|
| 15 |
"dimensions": 768,
|
| 16 |
"embeddings": [
|
| 17 |
-
[0.1, 0.2, 0.3, ...], # 768 values for each message
|
| 18 |
-
[0.
|
| 19 |
]
|
| 20 |
}
|
| 21 |
}
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel, Field, ConfigDict
|
| 2 |
+
from typing import List
|
| 3 |
|
| 4 |
class SMSRequest(BaseModel):
|
| 5 |
messages: List[str]
|
|
|
|
| 8 |
dimensions: int
|
| 9 |
embeddings: List[List[float]]
|
| 10 |
|
| 11 |
+
model_config = ConfigDict(
|
| 12 |
+
json_schema_extra={
|
|
|
|
| 13 |
"example": {
|
| 14 |
"dimensions": 768,
|
| 15 |
"embeddings": [
|
| 16 |
+
[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, ...], # 768 values for each message
|
| 17 |
+
[0.7, 0.8, 0.9, 1.0, 1.1, 1.2, ...]
|
| 18 |
]
|
| 19 |
}
|
| 20 |
}
|
| 21 |
+
)
|