Home » Calling AWS Bedrock from code. Using Python in a Jupyter pocket book | by Thomas Reid | Oct, 2023

Calling AWS Bedrock from code. Using Python in a Jupyter pocket book | by Thomas Reid | Oct, 2023

by Icecream
0 comment

Image by Author

Using Python in a Jupyter pocket book

Many of you’ll know that each man and his canine are producing AI merchandise or LLM’s and integrating them with their merchandise. Not surprisingly AWS — the most important cloud providers supplier — can also be getting in on the act.

What is bedrock?

Its AI providing is named Bedrock and the next blurb from it’s web site describes what Bedrock is.

Amazon Bedrock is a completely managed service that provides a selection of high-performing basis fashions (FMs) from main AI corporations like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon by way of a single API, together with a broad set of capabilities it is advisable construct generative AI functions, simplifying growth whereas sustaining privateness and safety. With Amazon Bedrock’s complete capabilities, you may simply experiment with a wide range of prime FMs, privately customise them together with your knowledge utilizing strategies similar to fine-tuning and retrieval augmented technology (RAG), and create managed brokers that execute complicated enterprise duties — from reserving journey and processing insurance coverage claims to creating advert campaigns and managing stock — all with out writing any code. Since Amazon Bedrock is serverless, you don’t need to handle any infrastructure, and you may securely combine and deploy generative AI capabilities into your functions utilizing the AWS providers you might be already acquainted with.

Recently, AWS Bedrock grew to become usually obtainable (GA) in sure areas which implies it is now “secure” to make use of it in manufacturing methods in these areas. You can use Bedrock straight from the AWS console however I suppose most organisations will wish to name it from code. To that finish, AWS has up to date its model of Boto3 to incorporate API calls to Bedrock. Boto3 is AWS’s Python library that permits you to entry, use and name AWS providers e.g S3, DynamoDB and so forth ….

So, if you wish to use Python to entry Bedrock you’ll have to improve your boto3 library to at the least model 1.28.57

You can take a look at the most recent boto3 documentation and get directions for downloading it by clicking the hyperlink beneath.

You may also like

Leave a Comment