Skip to content

Commit 5d7c63f

Browse files
authored
types: add capabilities to show response. (#511)
1 parent 5ae5f81 commit 5d7c63f

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

examples/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ See [ollama/docs/api.md](https://github.com/ollama/ollama/blob/main/docs/api.md)
4242
- [list.py](list.py)
4343

4444

45+
### Ollama Show - Display model properties and capabilities
46+
- [show.py](show.py)
47+
48+
4549
### Ollama ps - Show model status with CPU/GPU usage
4650
- [ps.py](ps.py)
4751

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

5761

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

examples/show.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from ollama import ShowResponse, show
2+
3+
response: ShowResponse = show('gemma3')
4+
print('Model Information:')
5+
print(f'Modified at: {response.modified_at}')
6+
print(f'Template: {response.template}')
7+
print(f'Modelfile: {response.modelfile}')
8+
print(f'License: {response.license}')
9+
print(f'Details: {response.details}')
10+
print(f'Model Info: {response.modelinfo}')
11+
print(f'Parameters: {response.parameters}')
12+
print(f'Capabilities: {response.capabilities}')

ollama/_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ class ShowResponse(SubscriptableBaseModel):
506506

507507
parameters: Optional[str] = None
508508

509+
capabilities: Optional[List[str]] = None
510+
509511

510512
class ProcessResponse(SubscriptableBaseModel):
511513
class Model(SubscriptableBaseModel):

0 commit comments

Comments
 (0)