#!/usr/bin/env python3
import ollama
response = ollama.chat(
    model="gpt-oss:20b", 
    options = {
        "num_predict": 2500 },  # corresponds to max_tokens
    messages = [
        { "role": "system",
          "content": "You are a programming assistant."},
        { "role": "user",
          "content": "How do I use list comprehension in Python?"} ] )

print("Done:         ", response.done)         # True/False
print("Done reason:  ", response.done_reason)  # "stop" at OpenAI
print("Output tokens:", response.eval_count)
print("Response message:")
print(response.message.content)

