Re:AI teaches itself to use an API
by paxys on Friday March 03, 2023 @09:35PM
(#35017560)
The learning from mistakes part of the example is – you tried /port_wines but the path is /wines/port instead.
But what about if the path is actually /beer. Also you have to pass a hidden undocumented query parameter called ?wine=1 for it to give you wines. But then the response is still of Beer objects (because that's the only thing the API validator would allow), so you have to map all the Beer fields to their equivalent Wine counterparts. But not all of them make sense, so you have to ignore them. Which ones? Ask the engineering team. Turns out the guy who wrote all this left years ago, and no one remember how it works. Someone digs up a link to a documentation page, but that internal wiki was taken down and so it returns a 404. You ping a sysadmin to see if they kept any backups. He points you to a few PBs worth of SQL dumps from an internal migration a few years ago and asks you to take a look in those. You simultaneously write up a status update for senior leadership which is due by end of day and give them a revised launch date for the project. They want to know why it can't be done in half the time.
The day an AI can figure all this out, I will be looking for another job. Until then I'm fine.
But what about if the path is actually /beer. Also you have to pass a hidden undocumented query parameter called ?wine=1 for it to give you wines. But then the response is still of Beer objects (because that's the only thing the API validator would allow), so you have to map all the Beer fields to their equivalent Wine counterparts. But not all of them make sense, so you have to ignore them. Which ones? Ask the engineering team. Turns out the guy who wrote all this left years ago, and no one remember how it works. Someone digs up a link to a documentation page, but that internal wiki was taken down and so it returns a 404. You ping a sysadmin to see if they kept any backups. He points you to a few PBs worth of SQL dumps from an internal migration a few years ago and asks you to take a look in those. You simultaneously write up a status update for senior leadership which is due by end of day and give them a revised launch date for the project. They want to know why it can't be done in half the time.
The day an AI can figure all this out, I will be looking for another job. Until then I'm fine.