Closed jwerre closed 3 weeks ago
Yeah had to make my own api wrapper, this was killing my builds. Was able to swap node-fetch
with https://www.npmjs.com/package/node-fetch-commonjs
Yeah had to make my own api wrapper, this was killing my builds. Was able to swap
node-fetch
with https://www.npmjs.com/package/node-fetch-commonjs
You could try using Fetch v2
Thanks for reporting this issue. We have deprecated this package in favor of mistralai/client-ts, which is the new official Mistral client, compatible with both TypeScript and JavaScript.
You can find all installation information here.
This change is effective starting with version 1.0.0 of the npm package.
Let us know if your issue persists with the new package by opening an issue there.
I see that node-fetch is used to make request to the Mistral API. Since node-fetch doesn't support CommonJs it would be pretty easy to remove it as a dependency. And, even better, you'd have zero dependencies. All you need to do is import the native
https
module and replace_request
with this:Happy to make a PR once #73 is merged