Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Bedrock Example (Single Provider)

This example demonstrates how to use LaunchDarkly's AI Config with the AWS Bedrock provider.

Prerequisites

  • Python 3.10 or higher
  • Poetry installed
  • A LaunchDarkly account and SDK key
  • AWS credentials configured for Bedrock access

Setup

  1. Create the following config in your LaunchDarkly project. You can use a different key by setting the environment variable in your .env.

    • Create an AI Config with a Bedrock model and a system message. Default key: sample-completion.
  2. Copy .env.example to .env and fill in your keys:

    cp .env.example .env

    LAUNCHDARKLY_COMPLETION_KEY defaults to sample-completion if not set.

    Ensure your AWS credentials can be auto-detected by the boto3 library. Setting them in .env is one option; role providers or shared credential files are also supported.

  3. Install the required dependencies:

    poetry install

Run

poetry run bedrock