LLM Version 0.32a0 Released: A Significant Architectural Update
The latest alpha release of the LLM Python library and CLI tool introduces fundamental changes to how it interacts with large language models (LLMs). This update, version 0.32a0, represents a major refactor while maintaining backwards compatibility.
From Prompts to Conversational Messages
Previous versions of LLM treated interactions as simple prompt-response pairs:
import llm
model = llm.get_model("gpt-5.5")
response = model.prompt("Capital of France?")
print(response.text())
However, this approach became limiting as LLMs evolved and began supporting more complex interactions.
The new design treats input as a sequence of conversational messages, mirroring how developers actually use these models:
import llm
model = llm.get_model("gpt-5.5")
response1 = model.prompt(user="Capital of France?")
print(response1.text())
# Subsequent turns build on the conversation history
response2 = model.prompt(user="Germany?", parent=response1)
print(response2.text())
This aligns with how APIs from major providers like OpenAI structure requests, where each turn includes the entire conversation context:
{
"model": "gpt-5.5",
"messages": [
{"role": "user", "content": "Capital of France?"},
{"role": "assistant", "content": "Paris"},
{"role": "user", "content": "Germany?"}
]
}
Structured Responses with Multiple Parts
Beyond conversational format, LLM 0.32a0 also allows for more structured responses:
- Instead of just returning text, models can now produce streams of different data types (images, audio, etc.)
- Output can include multiple parts like “text”, “image”, or “json” in a single response
This enables LLMs to generate richer content beyond simple textual answers.
Why This Matters
The architectural changes in LLM 0.32a0 provide:
- A more accurate representation of how developers actually use modern LLMs
- Better support for complex interactions like multi-turn conversations and tool usage
- The foundation for future features that enable even more sophisticated LLM applications