Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

1.9 KB
Raw Blame

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().