Create a .env
file with the API key. Refer this example: https://github.com/langchain-ai/langchainjs/blob/main/examples/.env.example
yarn intall
npx vite-node <filename>.ts
or
yarn dev --watch <filename>.ts
https://www.deeplearning.ai/short-courses/build-llm-apps-with-langchain-js/