Skip to content

Conversation

@InTheCloudDan
Copy link
Contributor

Add OpenAI and Bedrock examples

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

@InTheCloudDan InTheCloudDan requested a review from a team as a code owner October 25, 2024 17:08
}));
}

main(); No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to end the files with a blank line.

"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.679.0",
"@launchdarkly/ai": "0.1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this is a big tricky. This number will not automatically update without this example being in the workspaces list. Because that is how release-please updates it. But if it does update, then it also expects to be able to install from the workspace.

So you can add it to the workspace and update the instructions to build required components.

Or you can make some config which instructs release-please to update this JSON file.

Or you can manually update it. Or maybe renovate or dependabot could be persuaded to update it.

@@ -0,0 +1,70 @@
const LaunchDarkly = require('@launchdarkly/node-server-sdk');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend importing what you use instead of importing it all and using ..

I am mildly concerned about JavaScript examples as they are hard to keep functional. (Also CJS instead of ESM.)

Also customers usually want TypeScript.


}

main(); No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline.

name: 'Sandy',
};

console.log("*** SDK successfully initialized");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log is not accurate.

name: 'Sandy',
};

console.log("*** SDK successfully initialized");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log is not accurate.

"name": "@launchdarkly/hello-ai-bedrock",
"version": "0.1.0",
"description": "LaunchDarkly AI SDK for Node.js",
"main": "dist/index.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This main/types is incorrect.

"name": "@launchdarkly/hello-ai",
"version": "0.1.0",
"description": "LaunchDarkly AI SDK for Node.js",
"main": "dist/index.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main/types incorrect.

"type": "git",
"url": "github.com/launchdarkly/js-core"
}
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add newline.

@InTheCloudDan InTheCloudDan deleted the dob/REL-3130/aiExamples branch November 1, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants