Skip to content

Commit 5692336

Browse files
committed
update organization and instructions
1 parent 50b70e7 commit 5692336

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

examples/hello-openai/README.md renamed to examples/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,35 @@ This repository includes examples for `OpenAI` and `Bedrock`. Depending on your
1212

1313
### General setup
1414

15-
1. Install the required dependencies with `bundle install`
15+
1. Install the required dependencies with `bundle install` in the appropriate example directory.
1616
1. Set the environment variable `LAUNCHDARKLY_SDK_KEY` to your LaunchDarkly SDK key. If there is an existing an AI Config in your LaunchDarkly project that you want to evaluate, set `LAUNCHDARKLY_AI_CONFIG_KEY` to the flag key; otherwise, an AI Config of `sample-ai-config` will be assumed.
1717

1818
```bash
1919
export LAUNCHDARKLY_SDK_KEY="1234567890abcdef"
2020
export LAUNCHDARKLY_AI_CONFIG_KEY="sample-ai-config"
2121
```
22+
23+
1. Replace `my-default-model` with your preferred model if the application cannot connect to LaunchDarkly Services.
24+
25+
### OpenAI setup
26+
2227
1. Set the environment variable `OPENAI_API_KEY` to your OpenAI key.
2328

2429
```bash
25-
export OPEN_API_KEY="0987654321fedcba"
30+
export OPENAI_API_KEY="0987654321fedcba"
2631
```
32+
2733
1. Run the program `bundle exec ruby hello_openai.rb`
34+
35+
### Bedrock setup
36+
37+
1. Ensure the required AWS credentials can be [auto-detected by the AWS client][aws-configuration]. In the provided example we use the following environment variables.
38+
39+
```bash
40+
export AWS_ACCESS_KEY_ID="0987654321fedcba"
41+
export AWS_SECRET_ACCESS_KEY="0987654321fedcba"
42+
```
43+
44+
1. Run the program `bundle exec ruby hello_bedrock.rb`
45+
46+
[aws-configuration]: https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/configuring.html#precedence-settings

examples/hello-bedrock/Gemfile renamed to examples/chatbot/aws-bedrock/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
44

55
ruby '>= 3.0.0'
66

7-
gem 'aws-sdk-bedrockruntime'
7+
gem 'aws-sdk-bedrockruntime', '~> 1.0'
88
gem 'launchdarkly-server-sdk-ai', path: '../../..'
File renamed without changes.

0 commit comments

Comments
 (0)