Model.get_embeddings(input_text) for anomaly detection is not creating embeddings

This is from the course: Understanding and Applying Text Embeddings. Lesson 4. Anomaly Detection section in the notebook. For some reason, the model.get_embeddings([input_text])[0].values is returning a string “detail” instead of embeddings. (see below):

I am getting a similar error from the notebook in Lesson 5 & 6 as well, except the returned string is “message” (see below):

I have checked the model variable it is holding <vertexai.language_models._language_models.TextEmbeddingModel at 0x7f6e5b12f700> as expected.

However, when i run from a new gmail account, the notebook seems to run fine. Can you please tell me what’s going on ?

1 Like

Hello, @Samy_Palaniappan , I just today finished running through all the exercises for this short course (running them locally, on my Ubuntu 22.04 system rather than the online course). The section of code you’re showing above seems to be incomplete.

Whenever I’ve run into difficulties working with the online versions of jupyter notebooks for these short courses, simply “refreshing” my browser (so that the notebooks reload and refresh the runtime) often solves the problem. It also looks like there might be missing sections of the notebook? Have you run each step of the notebooks in order?