tree: 2cf5a89fe5bc867826b95ec888652f42e064e715
  1. __init__.py
  2. application.py
  3. README.md
  4. requirements.txt
examples/integrations/bedrock/README.md

Amazon Bedrock integration

This example shows how to use Burr’s Bedrock helpers:

  • BedrockAction — single-step Converse call.
  • BedrockStreamingAction — streaming ConverseStream with Application.stream_result.

Setup

  1. Install dependencies (from the repo root):

    pip install -r examples/integrations/bedrock/requirements.txt
    
  2. Configure AWS credentials and a region where Bedrock is available (for example AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION).

  3. Ensure your account can invoke the model you choose. Override the default model with BEDROCK_MODEL_ID if needed (default in code is Claude 3 Haiku on Bedrock).

Run

python examples/integrations/bedrock/application.py

The script runs a non-streaming call, then a streaming call, using two small Burr graphs defined in application() and streaming_application().