implemented the file upload and conversation management.