Add type safety to streaming reply func