mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-22 17:39:02 +00:00
feat(core): Upgrade pydantic to 2.x (#1428)
This commit is contained in:
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from fastapi import File, UploadFile
|
||||
|
||||
from dbgpt._private.pydantic import BaseModel, Field
|
||||
from dbgpt._private.pydantic import BaseModel, ConfigDict, Field
|
||||
from dbgpt.rag.chunk_manager import ChunkParameters
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class ChatCompletionRequestBody(BaseModel):
|
||||
"or in full each time. "
|
||||
"If this parameter is not provided, the default is full return.",
|
||||
)
|
||||
enable_vis: str = Field(
|
||||
enable_vis: bool = Field(
|
||||
default=True, description="response content whether to output vis label"
|
||||
)
|
||||
|
||||
@@ -267,6 +267,8 @@ class DocumentModel(BaseModel):
|
||||
class SyncModel(BaseModel):
|
||||
"""Sync model."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
"""doc_id: doc id"""
|
||||
doc_id: str = Field(None, description="The doc id")
|
||||
|
||||
|
Reference in New Issue
Block a user