Skip to content
Merged
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 model 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)

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

response: ShowResponse = show('gemma3')
print('Model Information:')
print(f'Modified at: {response.modified_at}')
print(f'Template: {response.template}')
print(f'Modelfile: {response.modelfile}')
print(f'License: {response.license}')
print(f'Details: {response.details}')
print(f'Model Info: {response.modelinfo}')
print(f'Parameters: {response.parameters}')
print(f'Capabilities: {response.capabilities}')
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
Loading