Below is a guide how to run the examples if you have cloned this repo.
- Node.js v18+
npm install && npm install --prefix examplescp examples/.env.template examples/.env
# Edit your .env fileIf you want to use the local mistralai package, you can link it to the examples directory. From the repository's root:
npm run build
npm link
(cd examples/src && npm link @mistralai/mistralai)npm run test --prefix examplesIf you just want to run one example file, you can do so with:
npm run test --prefix examples -- --files src/stag_async_moderation.ts