Talking with non Mahram must be limited to necessary talk only. It must never contain any word which can cause or initiate feelings. In fact, there is no question of friendship between you and your non Mahram. Friendship can involve sharing secrets and confidential matters, which can not be with a non Mahram.
Wassalam.