mirror of
https://github.com/ollama/ollama-python.git
synced 2026-08-22 04:29:51 +00:00
add support for thinking
To support https://github.com/ollama/ollama/pull/10584
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from ollama import chat
|
||||
|
||||
messages = [
|
||||
{
|
||||
'role': 'user',
|
||||
'content': 'What is 10 + 23?',
|
||||
},
|
||||
]
|
||||
|
||||
response = chat('deepseek-r1', messages=messages, think=True)
|
||||
|
||||
print('Thinking:\n========\n\n' + response.message.thinking)
|
||||
print('\nResponse:\n========\n\n' + response.message.content)
|
||||
Reference in New Issue
Block a user