diff --git a/modelscope_agent/tools/tool.py b/modelscope_agent/tools/tool.py index 121eb7e05..0fa626698 100644 --- a/modelscope_agent/tools/tool.py +++ b/modelscope_agent/tools/tool.py @@ -58,7 +58,7 @@ def __init__(self, cfg={}): except ValidationError: raise ValueError(f'Error when parsing parameters of {self.name}') - self._str = self.tool_schema.json(ensure_ascii=False) + self._str = self.tool_schema.model_dump_json() def __call__(self, remote=False, *args, **kwargs): if self.is_remote_tool or remote: diff --git a/requirements.txt b/requirements.txt index 8f4f04615..bef530b3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ ms-swift openai opencv-python Pillow -pydantic==1.10.8 +pydantic>=2.0.0 pytest python-dotenv soundfile