I'm not sure what chatbots you're using, but the big free ones at this point can and, in my experience, typically do give valid code samples for a surprising range of tasks. I'm skeptical about LLMs as the ultimate future of AI, but they aren't useless.