Text written by AI (artificial intelligence/chatbots), such as Chat GPT, Bing and Writesonic, is not a reliable source of information, and it is not recommended that it is used for academic assignments.
Chatbots such as ChatGPT can, nevertheless, be a legal aid in exams where all aids are permitted. If you submit any text, calculations etc. which is directly copied from a chatbot/AI, you must cite it as a source. If you don't, you are technically presenting someone else's work as your own, and it is then considered cheating.