…and yet, I still kinda want one:
(you have to watch the video to really appreciate the restaurant-scale of it)
The word for the day is pakutsui = “pakuri (ripped-off/gobbled-up) + tweet”, for swiping someone else’s social-media post and pretending it’s your original work (I’ve never understood the use of the word “plagiarism” outside of school; if it isn’t actual copyright infringement, it’s at worst just a dick move). The word paku used to be best known for the mimetic usage paku-paku = “gobble-gobble” from Pac-man.
I’ve been converting my quickie SwarmUI API script from Bash to Proper Python, with a simple OO wrapper to encapsulate connection variables, etc, and once I got the basic “gen an image” code working, I wanted to add the ability to ensure the output format was correct and included metadata. By default, the output’s in JPG with a filename containing a truncated prompt, complete with spaces. I hate whitespace in filenames, especially when you have to use them in a URL to download your results, so before I started with the Bash version, I fixed the default format server-side.
But in a generic library that might connect to other servers, I wanted
to force it to use sensible names, write PNG output, and include full
metadata. As usual for this API, the ChangeUserSettings call is
basically undocumented, but for extra fun, it never fails, always
returning {"success": true}.
You have to go read the server logs to find the
clear-but-still-not-very-useful error messages. You have to use
tcpdump -A to find out how it expects its arguments to be formatted.
TL/DR, parse the JSON output of /API/GetUserSettings and build a
“.”-separated fully-qualified setting name, like
fileformat.imageformat.
(having to check the logs to find the failure code gave me a really bad flashback to writing test code for the original Ooma account-management service, which was accessed by a nasty mix of SOAP and XML services calls, all of which expected the client to do all data validation (yes, Samir, I’m pointing that finger at you); I wouldn’t have said this publicly back when that code was still in Production…)
Writing this script for SwarmUI is actually a good example of where
“vibe coding” will let you down: there is zero public code using
this API outside of the Javascript used in the app itself and one
extremely basic curl example in the docs (“get session id, generate
image with default params, download results”). The only reason I got
the existing script to work was because I wrote a minimal repeat-by
and asked the devs on
Discord.
To even have a chance at writing correct Python code for this, an LLM would have to ingest the entire repo, analyze a bunch of Javascript and C# code, and then repeatedly be fed server logs until it stopped getting errors. You’d either have to give it full control of your computer or spend valuable you-time acting as its hands while it played the two-steps-forward-six-fingers-back game of iterating over broken hallucinated code.
Or wait until I publish mine and the latest Github-scrapings get integrated into the latest models.
Markdown formatting and simple HTML accepted.
Sometimes you have to double-click to enter text in the form (interaction between Isso and Bootstrap?). Tab is more reliable.