BaşlayınÜcretsiz Başlayın

Digging into the embeddings response

You've been able to successfully use the OpenAI Embeddings endpoint to embed text data, and in this exercise, you'll finish this off by extracting information from the API's response.

You've been provided with a response from the Embeddings API, which has already been converted into a dictionary and stored as response_dict. You'll need to extract the desired information from this dictionary. This response_dict has been printed for you, so you can view its contents and structure.

Recall that the response is structured like a nested Python dictionary, and it can be accessed in much the same way.

Bu egzersiz

Introduction to Embeddings with the OpenAI API

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Extract the total_tokens from response_dict
print(____)
Kodu Düzenle ve Çalıştır