In the following lecture, make sure you add the following import to your notebook.
from tenacity import retry, wait_random_exponential, stop_after_attempt
It can be anywhere, as long as it's above your get_embedding
function (and you make sure you invoke it before trying to define get_embedding
):