Skip to content

Commit 4ed8e39

Browse files
committed
chore: Add note for multi-providers and installing provider packages
1 parent 65f8bcc commit 4ed8e39

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

packages/ai-providers/server-ai-langchain/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@ if (chat) {
5757

5858
For more information about using the LaunchDarkly AI SDK, see the [LaunchDarkly AI SDK documentation](https://github.com/launchdarkly/js-core/tree/main/packages/sdk/server-ai/README.md).
5959

60+
## Langchain Provider Installation
61+
62+
> **Important**: You will need to install additional provider packages for the specific AI models you want to use. LangChain requires separate packages for each provider.
63+
64+
When creating a new LangChain model, LaunchDarkly uses an AI Config and the `initChatModel` provided by LangChain to create a model instance. You should install all LangChain providers for each provider you plan to use in your AI Config to ensure they can be properly instantiated.
65+
66+
### Installing a LangChain Provider
67+
68+
To use specific AI models, install the corresponding provider package:
69+
70+
```shell
71+
# For OpenAI models
72+
npm install @langchain/openai
73+
```
74+
75+
For a complete list of available providers and installation instructions, see the [LangChain JavaScript Integrations documentation](https://js.langchain.com/docs/integrations/chat/).
76+
6077
## Advanced Usage
6178

6279
For more control, you can use the LangChain provider package directly with LaunchDarkly configurations:

packages/ai-providers/server-ai-vercel/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@ if (chat) {
5757

5858
For more information about using the LaunchDarkly AI SDK, see the [LaunchDarkly AI SDK documentation](https://github.com/launchdarkly/js-core/tree/main/packages/sdk/server-ai/README.md).
5959

60+
## Vercel AI Provider Installation
61+
62+
> **Important**: You will need to install additional provider packages for the specific AI models you want to use. The Vercel AI SDK requires separate packages for each provider.
63+
64+
When creating a new Vercel AI model, LaunchDarkly uses an AI Config and the Vercel AI SDK's provider system to create a model instance. You should install all Vercel AI provider packages for each provider you plan to use in your AI Config to ensure they can be properly instantiated.
65+
66+
### Installing a Vercel AI Provider
67+
68+
To use specific AI models, install the corresponding provider package:
69+
70+
```shell
71+
# For OpenAI models
72+
npm install @ai-sdk/openai
73+
```
74+
75+
For a complete list of available providers and installation instructions, see the [Vercel AI SDK Providers documentation](https://sdk.vercel.ai/providers).
76+
6077
## Advanced Usage
6178

6279
For more control, you can use the Vercel AI provider package directly with LaunchDarkly configurations:

0 commit comments

Comments
 (0)