# ExAws.Bedrock

> The easiest way to build and scale generative AI applications with foundation models
> --

Service module for [Elixir AWS](

***NOTE*** this is a work in progress as the operations are uploaded over the next few days
and requires a minimum `ex_aws` version of 2.5.1.

[![API Docs](](

## Installation

The package can be installed by adding `:ex_aws_bedrock` to your list of dependencies in `mix.exs`
along with `:ex_aws`, and your preferred HTTP client and JSON codec.

def deps do
    {:ex_aws, ">= 2.5.1"},
    {:ex_aws_bedrock, "~> 1.5"},
    {:hackney, "~> 1.9"},
    {:jason, "~> 1.1"},
    {:poison, "~> 3.0"}

## Unit tests

The default suite of unit tests verify the requests generated by this library. 
If you wish to test against AWS with live requests then you need to 
configure `ExAws` in the standard way as described in it's README.

For example you could create an `.env` file:

    export AWS_ACCESS_KEY_ID="AK..."
    export AWS_SECRET_ACCESS_KEY="..."
    export AWS_REGION="us-east-1"
Then set the variables and run the tests with:

    source .env && mix test --only aws

## Usage

The AWS bedrock actions and operations are defined in [ExAws.Bedrock module][mod].

Each model takes their inference parameters as JSON documents which are defined 
in the [model parameters section of the AWS user guide][models]. You can pass 
plain Elixir maps which are then JSON encoded, or define structs which implement
the encoder protocol of your chosen JSON codec. This library has an example
under [ExAws.Bedrock.Titan.TextModel](lib/ex_aws/bedrock/titan/text_model.ex).

## License

The MIT License (MIT).