#!/usr/bin/env python3
"""First Ember program - demonstrates clean API design."""

from ember.api import models

def main():
    """Simple demonstration of Ember's unified API."""
    model = "qwen2.5:0.5b"

    # Example 1: Direct question
    print(f"Model: {model}")
    print(f"Q: What is the capital of France?")
    response = models(model, "What is the capital of France?")
    print(f"A: {response}\n")

    # Example 2: Creative task
    print(f"Q: Write a haiku about programming")
    response = models(model, "Write a haiku about programming")
    print(f"A: {response}\n")

    # Example 3: Conversational assistant
    print("Creating assistant for conversation...")
    assistant = models.instance(model, temperature=0.7)

    print(f"Q: Tell me a programming joke")
    response = assistant("Tell me a programming joke")
    print(f"A: {response}\n")

    print(f"Q: Why is it funny?")
    response = assistant("Why is it funny?")
    print(f"A: {response}")

if __name__ == "__main__":
    main()
