fix for chat example
Better API for model