Gravar-mail: Learning Generative State Space Models for Active Inference