Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed 'show' to use POST instead of GET #10

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Changed 'show' to use POST instead of GET #10

merged 1 commit into from
Jan 16, 2024

Conversation

easp
Copy link

@easp easp commented Jan 14, 2024

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.

Copy link
Collaborator

@mxyng mxyng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@mxyng mxyng merged commit 1a60f07 into ollama:main Jan 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants