Tree: Switch to Pydantic 2
Pydantic 2 has more modern methods and stability compared to Pydantic 1 Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
f631dd6ff7
commit
51ca1ff396
8 changed files with 18 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel, Field, ConfigDict
|
||||
from time import time
|
||||
from typing import List, Optional
|
||||
from gen_logging import LogConfig
|
||||
|
|
@ -45,6 +45,9 @@ class ModelLoadRequest(BaseModel):
|
|||
draft: Optional[DraftModelLoadRequest] = None
|
||||
|
||||
class ModelLoadResponse(BaseModel):
|
||||
# Avoids pydantic namespace warning
|
||||
model_config = ConfigDict(protected_namespaces = [])
|
||||
|
||||
model_type: str = "model"
|
||||
module: int
|
||||
modules: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue