mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-31 16:39:48 +00:00
feat(core): Upgrade pydantic to 2.x (#1428)
This commit is contained in:
@@ -40,6 +40,7 @@ from dbgpt.util.tracer import root_tracer, trace
|
||||
from ..api.schemas import (
|
||||
DocumentServeRequest,
|
||||
DocumentServeResponse,
|
||||
DocumentVO,
|
||||
KnowledgeSyncRequest,
|
||||
SpaceServeRequest,
|
||||
SpaceServeResponse,
|
||||
@@ -419,7 +420,7 @@ class Service(BaseService[KnowledgeSpaceEntity, SpaceServeRequest, SpaceServeRes
|
||||
def _sync_knowledge_document(
|
||||
self,
|
||||
space_id,
|
||||
doc: KnowledgeDocumentEntity,
|
||||
doc_vo: DocumentVO,
|
||||
chunk_parameters: ChunkParameters,
|
||||
) -> List[Chunk]:
|
||||
"""sync knowledge document chunk into vector store"""
|
||||
@@ -431,6 +432,8 @@ class Service(BaseService[KnowledgeSpaceEntity, SpaceServeRequest, SpaceServeRes
|
||||
)
|
||||
from dbgpt.storage.vector_store.base import VectorStoreConfig
|
||||
|
||||
doc = KnowledgeDocumentEntity.from_document_vo(doc_vo)
|
||||
|
||||
space = self.get({"id": space_id})
|
||||
config = VectorStoreConfig(
|
||||
name=space.name,
|
||||
|
Reference in New Issue
Block a user