types: add capabilities to show response. (#511)

This commit is contained in:
JRinaldi
2025-05-15 11:27:48 +09:00
committed by GitHub
parent 5ae5f816bb
commit 5d7c63fae1
3 changed files with 18 additions and 1 deletions

View File

@@ -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)
@@ -55,7 +59,6 @@ Requirement: `pip install tqdm`
- [create.py](create.py)
### Ollama Embed - Generate embeddings with a model
- [embed.py](embed.py)

12
examples/show.py Normal file
View File

@@ -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}')