improve: mordernizing validation by migrating pydantic from 1.x to 2.x (#4592)
This commit is contained in:
parent
e8afc416dd
commit
f976740b57
87 changed files with 697 additions and 300 deletions
|
|
@ -2,7 +2,7 @@ from abc import abstractmethod
|
|||
from typing import Any, Optional
|
||||
|
||||
from msal_extensions.persistence import ABC
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from core.callback_handler.index_tool_callback_handler import DatasetIndexToolCallbackHandler
|
||||
|
||||
|
|
@ -17,9 +17,7 @@ class DatasetRetrieverBaseTool(BaseModel, ABC):
|
|||
hit_callbacks: list[DatasetIndexToolCallbackHandler] = []
|
||||
return_resource: bool
|
||||
retriever_from: str
|
||||
|
||||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True)
|
||||
|
||||
@abstractmethod
|
||||
def _run(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue