Skip to content

Commit 1a60f07

Browse files
authored
Merge pull request #10 from easp/main
Changed 'show' to use POST instead of GET
2 parents 53b10f7 + 27e2ef1 commit 1a60f07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ollama/_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def copy(self, source: str, destination: str) -> Mapping[str, Any]:
304304
return {'status': 'success' if response.status_code == 200 else 'error'}
305305

306306
def show(self, model: str) -> Mapping[str, Any]:
307-
return self._request('GET', '/api/show', json={'name': model}).json()
307+
return self._request('POST', '/api/show', json={'name': model}).json()
308308

309309

310310
class AsyncClient(BaseClient):
@@ -580,7 +580,7 @@ async def copy(self, source: str, destination: str) -> Mapping[str, Any]:
580580
return {'status': 'success' if response.status_code == 200 else 'error'}
581581

582582
async def show(self, model: str) -> Mapping[str, Any]:
583-
response = await self._request('GET', '/api/show', json={'name': model})
583+
response = await self._request('POST', '/api/show', json={'name': model})
584584
return response.json()
585585

586586

0 commit comments

Comments
 (0)