Skip to content

Commit

Permalink
update to pydantic 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhicheng Zhang committed Nov 1, 2023
1 parent 35c34f4 commit acea664
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modelscope_agent/tools/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ms-swift
openai
opencv-python
Pillow
pydantic==1.10.8
pydantic>=2.0.0
pytest
python-dotenv
soundfile
Expand Down

0 comments on commit acea664

Please sign in to comment.