An Online Learning Approach to Prompt-based Selection of Generative Models