mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-14 06:07:17 +08:00
types: add capabilities to show response. (#511)
This commit is contained in:
parent
5ae5f816bb
commit
5d7c63fae1
@ -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
12
examples/show.py
Normal 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}')
|
||||
@ -506,6 +506,8 @@ class ShowResponse(SubscriptableBaseModel):
|
||||
|
||||
parameters: Optional[str] = None
|
||||
|
||||
capabilities: Optional[List[str]] = None
|
||||
|
||||
|
||||
class ProcessResponse(SubscriptableBaseModel):
|
||||
class Model(SubscriptableBaseModel):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user