File: thinking-generate.py

package info (click to toggle)
ollama-python 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: python: 3,056; makefile: 5
file content (6 lines) | stat: -rw-r--r-- 208 bytes parent folder | download
1
2
3
4
5
6
from ollama import generate

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)