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

Initializing the Bedrock client

You're consulting for a fast-growing e-commerce startup that wants to integrate AI into its customer service platform. The team has heard about Amazon Bedrock but needs help connecting to it so they can build a proof-of-concept for their newest AI feature. You step in to establish the connection and demonstrate which Bedrock models could power their customer service software.

Bu egzersiz, kursun bir parçasıdır

Introduction to Amazon Bedrock

Kursa Göz Atın

Egzersiz talimatları

  • Import the boto3 library.
  • Verify the connection by listing the available foundation models.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Import the boto 3 library
import ____

bedrock = boto3.client(
    'bedrock', region_name='us-east-1'
)

# List available models
models = bedrock.____

print(models['modelSummaries'])
Kodu Düzenle ve Çalıştır