@huggingface/inference 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -254,7 +254,7 @@ async function request(args, options) {
254
254
  throw new Error(`Server ${args.model} does not seem to support chat completion. Error: ${output.error}`);
255
255
  }
256
256
  if (output.error) {
257
- throw new Error(output.error);
257
+ throw new Error(JSON.stringify(output.error));
258
258
  }
259
259
  }
260
260
  throw new Error("An error occurred while fetching the blob");
package/dist/index.js CHANGED
@@ -201,7 +201,7 @@ async function request(args, options) {
201
201
  throw new Error(`Server ${args.model} does not seem to support chat completion. Error: ${output.error}`);
202
202
  }
203
203
  if (output.error) {
204
- throw new Error(output.error);
204
+ throw new Error(JSON.stringify(output.error));
205
205
  }
206
206
  }
207
207
  throw new Error("An error occurred while fetching the blob");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/inference",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "packageManager": "pnpm@8.10.5",
5
5
  "license": "MIT",
6
6
  "author": "Tim Mikeladze <tim.mikeladze@gmail.com>",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "type": "module",
41
41
  "dependencies": {
42
- "@huggingface/tasks": "^0.11.2"
42
+ "@huggingface/tasks": "^0.12.9"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "18.13.0"
@@ -32,7 +32,7 @@ export async function request<T>(
32
32
  throw new Error(`Server ${args.model} does not seem to support chat completion. Error: ${output.error}`);
33
33
  }
34
34
  if (output.error) {
35
- throw new Error(output.error);
35
+ throw new Error(JSON.stringify(output.error));
36
36
  }
37
37
  }
38
38
  throw new Error("An error occurred while fetching the blob");