Skip to content

add capabilities to show response. #511

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ See [ollama/docs/api.md](https://github.com/ollama/ollama/blob/main/docs/api.md)
- [list.py](list.py)


### Ollama Show - Display downloaded model's properties and capabilities
- [show.py](show.py)


### Ollama ps - Show model status with CPU/GPU usage
- [ps.py](ps.py)

Expand All @@ -55,7 +59,6 @@ Requirement: `pip install tqdm`
- [create.py](create.py)



### Ollama Embed - Generate embeddings with a model
- [embed.py](embed.py)

11 changes: 11 additions & 0 deletions examples/show.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from ollama import ShowResponse, show

response: ShowResponse = show("gemma3")
print(f"Modified at: {response.modified_at}\n")
print(f"Template: {response.template}\n")
print(f"Modelfile: {response.modelfile}\n")
print(f"License: {response.license}\n")
print(f"Details: {response.details}\n")
print(f"Model Info: {response.modelinfo}\n")
print(f"Parameters: {response.parameters}\n")
print(f"Capabilities: {response.capabilities}\n")
2 changes: 2 additions & 0 deletions ollama/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ class ShowResponse(SubscriptableBaseModel):

parameters: Optional[str] = None

capabilities: Optional[list[str]] = None


class ProcessResponse(SubscriptableBaseModel):
class Model(SubscriptableBaseModel):
Expand Down