mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user