mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
14 lines
288 B
Python
14 lines
288 B
Python
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)
|
|
print('\nResponse:\n========\n\n' + response.response)
|