diff --git a/modelscope_agent/tools/base.py b/modelscope_agent/tools/base.py index 8ad6e67a..57a9ec89 100644 --- a/modelscope_agent/tools/base.py +++ b/modelscope_agent/tools/base.py @@ -218,6 +218,8 @@ def _build_function(self): 'description': para['description'] } + if 'type' in para and para['type'] == 'array': + function_details['items'] = para['items'] if 'enum' in para and para['enum'] not in ['', []]: function_details['enum'] = para['enum'] function['parameters']['properties'][