mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-14 06:07:17 +08:00
* Examples and README updates --------- Co-authored-by: fujitatomoya <tomoya.fujita825@gmail.com> Co-authored-by: Michael Yang <mxyng@pm.me>
15 lines
470 B
Python
15 lines
470 B
Python
from ollama import list
|
|
from ollama import ListResponse
|
|
|
|
response: ListResponse = list()
|
|
|
|
for model in response.models:
|
|
print('Name:', model.model)
|
|
print(' Size (MB):', f'{(model.size.real / 1024 / 1024):.2f}')
|
|
if model.details:
|
|
print(' Format:', model.details.format)
|
|
print(' Family:', model.details.family)
|
|
print(' Parameter Size:', model.details.parameter_size)
|
|
print(' Quantization Level:', model.details.quantization_level)
|
|
print('\n')
|