Extract prompts to messages