return full list objects

This commit is contained in:
Michael Yang 2024-01-10 17:20:35 -08:00
parent 008a6a6b00
commit d2ea72ae07

View File

@ -297,7 +297,7 @@ class Client(BaseClient):
return {'status': 'success' if response.status_code == 200 else 'error'}
def list(self) -> Mapping[str, Any]:
return self._request('GET', '/api/tags').json().get('models', [])
return self._request('GET', '/api/tags').json()
def copy(self, source: str, target: str) -> Mapping[str, Any]:
response = self._request('POST', '/api/copy', json={'source': source, 'destination': target})
@ -573,7 +573,7 @@ class AsyncClient(BaseClient):
async def list(self) -> Mapping[str, Any]:
response = await self._request('GET', '/api/tags')
return response.json().get('models', [])
return response.json()
async def copy(self, source: str, target: str) -> Mapping[str, Any]:
response = await self._request('POST', '/api/copy', json={'source': source, 'destination': target})