|
2 | 2 |
|
3 | 3 | This package provides the LaunchDarkly AI SDK for Node.js. |
4 | 4 |
|
5 | | -## Installation |
| 5 | +## LaunchDarkly overview |
| 6 | + |
| 7 | +[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today! |
| 8 | + |
| 9 | +[](https://twitter.com/intent/follow?screen_name=launchdarkly) |
| 10 | + |
| 11 | +## Quick Setup |
| 12 | + |
| 13 | +This assumes that you have already installed the LaunchDarkly Node.js SDK, or a compatible edge |
| 14 | +SDK. |
| 15 | + |
| 16 | +1. Install this package with `npm` or `yarn`: |
| 17 | + |
| 18 | +```shell |
| 19 | +npm install @launchdarkly/server-sdk-ai --save |
| 20 | +``` |
| 21 | + |
| 22 | +2. Create an AI SDK instance: |
| 23 | + |
| 24 | +```typescript |
| 25 | +// The ldClient instance should be created based on the instructions in the relevant SDK. |
| 26 | +const aiClient = initAi(ldClient); |
| 27 | +``` |
| 28 | + |
| 29 | +3. Evaluate a model configuration: |
| 30 | +``` |
| 31 | + const config = await aiClient.modelConfig( |
| 32 | + aiConfigKey!, |
| 33 | + context, |
| 34 | + { enabled: false }, |
| 35 | + { myVariable: 'My User Defined Variable' }, |
| 36 | + ); |
| 37 | +``` |
| 38 | + |
| 39 | +For an example of how to use the config please refer to the examples folder. |
| 40 | + |
| 41 | +## Contributing |
| 42 | + |
| 43 | +We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK. |
| 44 | + |
| 45 | +## About LaunchDarkly |
| 46 | + |
| 47 | +- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can: |
| 48 | + - Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases. |
| 49 | + - Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?). |
| 50 | + - Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file. |
| 51 | + - Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). |
| 52 | + - Disable parts of your application to facilitate maintenance, without taking everything offline. |
| 53 | +- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/sdk) for a complete list. |
| 54 | +- Explore LaunchDarkly |
| 55 | + - [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information |
| 56 | + - [docs.launchdarkly.com](https://docs.launchdarkly.com/ 'LaunchDarkly Documentation') for our documentation and SDK reference guides |
| 57 | + - [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ 'LaunchDarkly API Documentation') for our API documentation |
| 58 | + - [blog.launchdarkly.com](https://blog.launchdarkly.com/ 'LaunchDarkly Blog Documentation') for the latest product updates |
| 59 | + |
| 60 | +[node-otel-ci-badge]: https://github.com/launchdarkly/js-core/actions/workflows/node-otel.yml/badge.svg |
| 61 | +[node-otel-ci]: https://github.com/launchdarkly/js-core/actions/workflows/node-otel.yml |
| 62 | +[node-otel-npm-badge]: https://img.shields.io/npm/v/@launchdarkly/node-server-sdk-otel.svg?style=flat-square |
| 63 | +[node-otel-npm-link]: https://www.npmjs.com/package/@launchdarkly/node-server-sdk-otel |
0 commit comments