mirror of
https://github.com/ollama/ollama-python.git
synced 2026-10-05 00:27:23 +00:00
Changed 'show' to use POST instead of GET
This commit is contained in:
+2
-2
@@ -304,7 +304,7 @@ class Client(BaseClient):
|
|||||||
return {'status': 'success' if response.status_code == 200 else 'error'}
|
return {'status': 'success' if response.status_code == 200 else 'error'}
|
||||||
|
|
||||||
def show(self, model: str) -> Mapping[str, Any]:
|
def show(self, model: str) -> Mapping[str, Any]:
|
||||||
return self._request('GET', '/api/show', json={'name': model}).json()
|
return self._request('POST', '/api/show', json={'name': model}).json()
|
||||||
|
|
||||||
|
|
||||||
class AsyncClient(BaseClient):
|
class AsyncClient(BaseClient):
|
||||||
@@ -580,7 +580,7 @@ class AsyncClient(BaseClient):
|
|||||||
return {'status': 'success' if response.status_code == 200 else 'error'}
|
return {'status': 'success' if response.status_code == 200 else 'error'}
|
||||||
|
|
||||||
async def show(self, model: str) -> Mapping[str, Any]:
|
async def show(self, model: str) -> Mapping[str, Any]:
|
||||||
response = await self._request('GET', '/api/show', json={'name': model})
|
response = await self._request('POST', '/api/show', json={'name': model})
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user