Skip to content

Commit

Permalink
Merge pull request #10 from easp/main
Browse files Browse the repository at this point in the history
Changed 'show' to use POST instead of GET
  • Loading branch information
mxyng authored Jan 16, 2024
2 parents 53b10f7 + 27e2ef1 commit 1a60f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ollama/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def copy(self, source: str, destination: str) -> Mapping[str, Any]:
return {'status': 'success' if response.status_code == 200 else 'error'}

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):
Expand Down Expand Up @@ -580,7 +580,7 @@ async def copy(self, source: str, destination: str) -> Mapping[str, Any]:
return {'status': 'success' if response.status_code == 200 else 'error'}

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()


Expand Down

0 comments on commit 1a60f07

Please sign in to comment.