This example shows how to add code interpreting using the Code Interpreter SDK to an LLM running on IBM's WatsonX AI inference platform.
- Clone the repository
git clone https://github.com/e2b-dev/e2b-cookbook/
cd e2b-cookbook/examples/watsonx-ai-code-interpreter-js/- Install dependencies
npm install- Set up environment variables
Create a .env.local file in the root directory based on the provided .env.template:
# Get your credentials at dataplatform.cloud.ibm.com:
# - Under developer access, select the default project
# - Get the project ID
# - Get the wastonxai URL
# - Create an API key
WATSONX_PROJECT_ID = "project_id"
WATSONX_URL = "https://region.ml.cloud.ibm.com"
WATSONX_API_KEY = "your_api_key"
# Get your API key at e2b.dev:
E2B_API_KEY = "your_api_key"- Start the development server
npm run dev