If you’ve browsed the internet for a while, you’d prolly be familiar with the HTTP status code “404 Not found” but have you ever come across “418 I’m a teapot“? This code was an April Fool’s joke that got codified into the protocol and it inspired me to make a voice assistant in a teapot that only replies in HTTP status codes.
Utah Teapot

The choice of teapot models to use had only one obvious answer. The Utah teapot is a standard reference test model used in 3D modelling and is used as an in-joke in the computer graphics community. I used jharris’ Utah Teapot model as a base for my project. It’s a recreation of the teapot based on the original drawings by Martin Newell and compressed into the iconic 4:3 ratio.
Pop Up Mechanism
My idea of the final product to be a teapot where the lid opens up and a small screen pops out to display a 3 digit HTTP status code. However, due to budget reasons, for now I have to settle for a static label instead.

The curves of the teapot meant the servo had to be installed at an angle. A drive gear, rack and pinion then converts the rotation into linear motion. The lid is hinged to add secondary motion to the teapot and give it a bit more life. Note the red center “screen” comes in 2 pieces: a main body and a thin panel (the thin rectangle in the cross-section). This feature is so that a layer pause can be used to make a perfect overhang. I’m also really proud that the lid snaps onto the top of the center screen; using metal dowels has really expanded my capabilities for making hinges (they’re so much better than bolts).
To Write a Chatbot
In my final design, I want the teapot to be able to run speech recognition and reply accordingly. After a bit more research, it appears that there still aren’t discrete voice recognition modules for microcontrollers that can transcribe everything; there’re only modules that listen out for a set of key words and phrases, intended for home automation. This means I’ll have to run the program on a SBC like the Raspberry Pi Zero. Therefore, I’d most likely be using Python for this project.
While I could train or tune an LLM to generate replies, it seemed much too overkill for a chatbot that only responds in 3 digit codes. Inspired by ELIZA, the first natural language processing computer program, I decided to hardcode a bot that looks out for certain words or phrases to emulate language comprehension. It’s a bit cheeky and also not very smart but I hope putting it into an animatronic body would create a better illusion of life.
while True:
input_text = input("ask the teapot: ")
http_code = generate_response(input_text)
if prev_output == http_code and prev_output != 508:
http_code = 208
prev_output = http_code
translate_to_text(http_code)


Leave a Reply