Skip to content

Commit 47ec210

Browse files
authored
chore: Add note for multi-providers and installing provider packages (#961)
1 parent ba26071 commit 47ec210

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@ 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 --save
73+
# or
74+
yarn add @langchain/openai
75+
```
76+
77+
For a complete list of available providers and installation instructions, see the [LangChain JavaScript Integrations documentation](https://js.langchain.com/docs/integrations/chat/).
78+
6079
## Advanced Usage
6180

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

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@ 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 --save
73+
# or
74+
yarn add @ai-sdk/openai
75+
```
76+
77+
For a complete list of available providers and installation instructions, see the [Vercel AI SDK Providers documentation](https://sdk.vercel.ai/providers).
78+
6079
## Advanced Usage
6180

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

0 commit comments

Comments
 (0)