Here's a minimal Python chat interface for a model served locally by Ollama.
It's based on this general recipe:
- wait for the user to input a prompt
- add a message to chat history containing the user input
- send any system prompt (or none) + full chat history to the model (via API)
- add the completion from the model to chat history
- repeat
Used with Qwen3:0.6b, without a system prompt:
❯ python chat.py
> What's a lagomorph
<think>
Okay, the user is asking about what a lagomorph is. First, I need to recall what I know about lagomorphs. They're a group of mammals, right? Like the lizards and some rodents. Wait, but I remember that lizards and rodents are considered part of the order Lagomorpha, but some sources say they are separate. Let me check my notes.
Oh, right! The lagomorphs are a group of mammals that include the lizards and some rodents. But wait, I think some sources mention that they are actually lizards and some rodents. Wait, no, that can't be. Let me think again. The lagomorphs are the order that includes lizards and some rodents. So the user is probably confusing this with other orders. They might be referring to a specific group, but I need to make sure.
Wait, but I think the correct classification is that lagomorphs are a group of mammals, which includes lizards and some rodents. So the answer should state that they are a group of mammals, specifically lizards and some rodents, and explain their characteristics. Also, mention that they are part of the order Lagomorpha. Need to be precise here.
</think>
A **lagomorph** is a group of mammals, specifically the order **Lagomorpha**. This includes both **lizards** and some **rodents**. These organisms are characterized by their **long, coiled bodies** and **exoskeleton** (not fully enclosed in a shell), which allows them to have a **range of body sizes** from small, terrestrial lizards to larger, more mobile rodents. They are known for their **long, webbed feet** and **adapted for movement** in various environments.