Unfortunately if you had an AI write code for you that you tried to run, no one will want to try to fix that for you. AI’s generally try to write Home Assistant code as spoken language by mimicking others and just making things up. That is very unpleasant to try to fix.
Also there is not enough information in your question to determine what help you need with what, or even if it is Home Assistant related. Maybe there is a language translation problem or something.
Please read this FAQ post about the site and try to give us more information so we can help you.