From 27e2ef11618cec1098c745b34982671fac7f3358 Mon Sep 17 00:00:00 2001 From: Erik Sp Date: Sun, 14 Jan 2024 12:00:20 -0800 Subject: [PATCH] Changed 'show' to use POST instead of GET --- ollama/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ollama/_client.py b/ollama/_client.py index 4a928ed..18c5183 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -304,7 +304,7 @@ class Client(BaseClient): 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): @@ -580,7 +580,7 @@ class AsyncClient(BaseClient): 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()