Pega GenAI: UI Architecture and Version Support

Do we need to have our Pega application in Pega Cloud to implement GenAI? how can we acheive this in Onprem?