mirror of
https://github.com/ollama/ollama-python.git
synced 2026-06-21 23:24:57 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fdba575aeb | |||
| 3615139ea0 | |||
| 63ca747622 | |||
| 4c11d507b0 |
@@ -4,6 +4,7 @@ response: ListResponse = list()
|
||||
|
||||
for model in response.models:
|
||||
print('Name:', model.model)
|
||||
print(' Capabilities:', model.capabilities)
|
||||
print(' Size (MB):', f'{(model.size.real / 1024 / 1024):.2f}')
|
||||
if model.details:
|
||||
print(' Format:', model.details.format)
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
from ollama import generate
|
||||
|
||||
messages = [
|
||||
{
|
||||
'role': 'user',
|
||||
'content': 'What is 10 + 23?',
|
||||
},
|
||||
]
|
||||
|
||||
response = generate('deepseek-r1', 'why is the sky blue', think=True)
|
||||
|
||||
print('Thinking:\n========\n\n' + response.thinking)
|
||||
|
||||
@@ -464,6 +464,7 @@ class ListResponse(SubscriptableBaseModel):
|
||||
digest: Optional[str] = None
|
||||
size: Optional[ByteSize] = None
|
||||
details: Optional[ModelDetails] = None
|
||||
capabilities: Optional[List[str]] = None
|
||||
|
||||
models: Sequence[Model]
|
||||
'List of models.'
|
||||
|
||||
Reference in New Issue
Block a user