Amazon BedrockAI21 Labs, Anthropic, Cohere, Meta, Stability AI, Amazon과 같은 주요 AI 기업의 고성능 foundation model(FM)을 단일 API를 통해 제공하는 완전 관리형 서비스입니다. 보안, 프라이버시, 책임 있는 AI를 갖춘 생성형 AI 애플리케이션을 구축하는 데 필요한 광범위한 기능을 함께 제공합니다. Amazon Bedrock을 사용하면 사용 사례에 맞는 최고의 FM을 쉽게 실험하고 평가할 수 있으며, fine-tuning 및 Retrieval Augmented Generation(RAG)과 같은 기술을 사용하여 데이터로 비공개로 커스터마이징하고, 엔터프라이즈 시스템 및 데이터 소스를 사용하여 작업을 실행하는 agent를 구축할 수 있습니다. Amazon Bedrock은 serverless이므로 인프라를 관리할 필요가 없으며, 이미 익숙한 AWS 서비스를 사용하여 생성형 AI 기능을 애플리케이션에 안전하게 통합하고 배포할 수 있습니다.
pip install -qU  boto3
from langchain_aws import BedrockEmbeddings

embeddings = BedrockEmbeddings(
    credentials_profile_name="bedrock-admin", region_name="us-east-1"
)
embeddings.embed_query("This is a content of the document")
embeddings.embed_documents(
    ["This is a content of the document", "This is another document"]
)
# async embed query
await embeddings.aembed_query("This is a content of the document")
# async embed documents
await embeddings.aembed_documents(
    ["This is a content of the document", "This is another document"]
)

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I