mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 16:27:45 +01:00
Update modelscope/hub/api.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -953,9 +953,9 @@ class HubApi:
|
||||
'page_size': page_size,
|
||||
}
|
||||
if sort:
|
||||
if sort not in SortKeyMap:
|
||||
if sort not in VALID_SORT_KEYS:
|
||||
raise InvalidParameter(
|
||||
f'Invalid sort key: {sort}. Supported sort keys: {list(SortKeyMap.keys())}')
|
||||
f'Invalid sort key: {sort}. Supported sort keys: {list(VALID_SORT_KEYS)}')
|
||||
params['sort'] = sort
|
||||
if search:
|
||||
params['search'] = search
|
||||
|
||||
Reference in New Issue
Block a user