You can access foundation models in IBM watsonx.ai programmatically by using the watsonx.ai Node.js package.
See the following resources:
- Package documentation: IBM watsonx.ai Node.js SDK
- Examples: Node.js GitHub repo
You can also work with watsonx.ai foundation models from third-party development packages, including:
- LangChain
-
The LangChain JavaScript community package includes the following components:
Using the Node.js package from your IDE
The @ibm-cloud/watsonx-ai
npm package is available from the registry link: https://www.npmjs.com/package/@ibm-cloud/watsonx-ai.
You can install the watsonx-ai
package in your integrated development environment by using the following command:
npm install @ibm-cloud/watsonx-ai
Prerequisites
To get started with the watsonx.ai Node.js package, you first need credentials and a project ID or deployment ID. For more information, see the following topics:
Parent topic: Coding generative AI solutions