Looks like latest chatGPT likes to hallucinate code segments that don't work or wrong API calls. Simpler instructions work fine, but at some point it starts to diverge and experiment.