Skip to content

Commit e36bc35

Browse files
committed
Update example readme files.
1 parent 3c5780c commit e36bc35

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

packages/sdk/server-ai/examples/bedrock/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ This package demonstrates the integration of LaunchDarkly's AI SDK with AWS Bedr
44

55
## Installation and Build
66

7-
To install the package and its dependencies, run:
7+
When running as part of the js-core mono-repo the project will use local dependencies.
8+
As such those dependencies need built.
9+
10+
In the root of the repository run:
811

912
```bash
10-
npm install
13+
yarn
1114
```
1215

13-
Then build the project:
16+
And then
1417

1518
```bash
16-
npm run build
19+
yarn build
1720
```
1821

1922
## Configuration
@@ -36,8 +39,8 @@ The main script (`index.js`) demonstrates how to:
3639
5. Send a prompt to AWS Bedrock
3740
6. Track token usage
3841

39-
To run the example:
42+
To run the example (in the bedrock directory):
4043

4144
```bash
42-
node dist/index.js
45+
yarn start
4346
```

packages/sdk/server-ai/examples/bedrock/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"type": "commonjs",
88
"scripts": {
99
"build": "tsc",
10+
"start": "yarn build && node ./dist/index.js",
1011
"lint": "npx eslint . --ext .ts",
1112
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
1213
"lint:fix": "yarn run lint --fix",

packages/sdk/server-ai/examples/openai/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ This package demonstrates the integration of LaunchDarkly's AI SDK with OpenAI,
44

55
## Installation and Build
66

7-
To install the package and its dependencies, run:
7+
8+
When running as part of the js-core mono-repo the project will use local dependencies.
9+
As such those dependencies need built.
10+
11+
In the root of the repository run:
812

913
```bash
10-
npm install
14+
yarn
1115
```
1216

13-
Then build the project:
17+
And then
1418

1519
```bash
16-
npm run build
20+
yarn build
1721
```
1822

1923
## Configuration
@@ -35,12 +39,12 @@ The main script (`index.js`) demonstrates how to:
3539
5. Send a prompt to OpenAI
3640
6. Track token usage
3741

38-
To run the example:
42+
To run the example (in the openai directory):
3943

4044
```bash
41-
node dist/index.js
45+
yarn start
4246
```
4347

4448
## Note
4549

46-
This example uses OpenAI's chat completions API. Make sure your LaunchDarkly AI configuration is set up correctly to work with OpenAI's models and API structure.
50+
This example uses OpenAI's chat completions API. Make sure your LaunchDarkly AI configuration is set up correctly to work with OpenAI's models and API structure.

packages/sdk/server-ai/examples/openai/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"build": "tsc",
9+
"start": "yarn build && node ./dist/index.js",
910
"lint": "npx eslint . --ext .ts",
1011
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
1112
"lint:fix": "yarn run lint --fix",

0 commit comments

Comments
 (0)