Switch to new embedding API which is part of upstream