#!/usr/bin/env python3
import lmstudio as lms
model  = lms.llm("openai/gpt-oss-20b")
system = "You are a helpful Python coding assistant"
prompt = "Python: How to flatten a nested list?"
chat   = lms.Chat(system)
chat.add_user_message(prompt)
for fragment in model.respond_stream(chat):
    print(fragment.content, end="", flush=True)
