Code issue in Getting Started with Text Emdeddings

The issue is if you run the following code in the Video

embedding_model = TextEmbeddingModel.from_pretrained(
“textembedding-gecko@001”)

It would run but while generating the embeddings for the sentence it might throw you an error because Google has retired that embedding model

So, try the changing the embedding model to the following:

embedding_model = TextEmbeddingModel.from_pretrained(“text-embedding-005”)

This will remove the error for you code.

Thanks for the tip.

Keeping the Short Courses up-to-date is a considerable challenge. This industry moves very quickly.

Yes, all the code in the course seems to be having the same problem with using the models as many of them have been depreciated by now and even it doesn’t have access to use the new models. They really need to make changes to the code.