[PR #10] [MERGED] Changed 'show' to use POST instead of GET #320

Closed
opened 2026-02-15 16:29:57 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama-python/pull/10
Author: @easp
Created: 1/14/2024
Status: Merged
Merged: 1/16/2024
Merged by: @mxyng

Base: mainHead: main


📝 Commits (1)

  • 27e2ef1 Changed 'show' to use POST instead of GET

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 ollama/_client.py (+2 -2)

📄 Description

ollama.show failed:

---------------------------------------------------------------------------
ResponseError                             Traceback (most recent call last)
Cell In[9], line 1
----> 1 ollama.show(model = "zephyr:latest")

File ~/miniforge3/envs/ollama/lib/python3.11/site-packages/ollama/_client.py:307, in Client.show(self, model)
    306 def show(self, model: str) -> Mapping[str, Any]:
--> 307   return self._request('GET', '/api/show', json={'name': model}).json()

File ~/miniforge3/envs/ollama/lib/python3.11/site-packages/ollama/_client.py:59, in Client._request(self, method, url, **kwargs)
     57   response.raise_for_status()
     58 except httpx.HTTPStatusError as e:
---> 59   raise ResponseError(e.response.text, e.response.status_code) from None
     61 return response

ResponseError: 404 page not found

Fixed by changed method from GET to POST.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama-python/pull/10 **Author:** [@easp](https://github.com/easp) **Created:** 1/14/2024 **Status:** ✅ Merged **Merged:** 1/16/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`27e2ef1`](https://github.com/ollama/ollama-python/commit/27e2ef11618cec1098c745b34982671fac7f3358) Changed 'show' to use POST instead of GET ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ollama/_client.py` (+2 -2) </details> ### 📄 Description ollama.show failed: ``` --------------------------------------------------------------------------- ResponseError Traceback (most recent call last) Cell In[9], line 1 ----> 1 ollama.show(model = "zephyr:latest") File ~/miniforge3/envs/ollama/lib/python3.11/site-packages/ollama/_client.py:307, in Client.show(self, model) 306 def show(self, model: str) -> Mapping[str, Any]: --> 307 return self._request('GET', '/api/show', json={'name': model}).json() File ~/miniforge3/envs/ollama/lib/python3.11/site-packages/ollama/_client.py:59, in Client._request(self, method, url, **kwargs) 57 response.raise_for_status() 58 except httpx.HTTPStatusError as e: ---> 59 raise ResponseError(e.response.text, e.response.status_code) from None 61 return response ResponseError: 404 page not found ``` Fixed by changed method from GET to POST. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 16:29:57 -05:00
yindo closed this issue 2026-02-15 16:29:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#320