feat(core): Upgrade pydantic to 2.x (#1428)

This commit is contained in:
Fangyin Cheng
2024-04-20 09:41:16 +08:00
committed by GitHub
parent baa1e3f9f6
commit 57be1ece18
103 changed files with 1146 additions and 534 deletions

View File

@@ -138,7 +138,9 @@ async def update(
@router.delete("/flows/{uid}")
async def delete(uid: str, service: Service = Depends(get_service)) -> Result[None]:
async def delete(
uid: str, service: Service = Depends(get_service)
) -> Result[ServerResponse]:
"""Delete a Flow entity
Args:

View File

@@ -1,3 +1,5 @@
from dbgpt._private.pydantic import ConfigDict
# Define your Pydantic schemas here
from dbgpt.core.awel.flow.flow_factory import FlowPanel
@@ -10,5 +12,5 @@ class ServerResponse(FlowPanel):
"""Flow response model"""
# TODO define your own fields here
class Config:
title = f"ServerResponse for {SERVE_APP_NAME_HUMP}"
model_config = ConfigDict(title=f"ServerResponse for {SERVE_APP_NAME_HUMP}")