@huggingface/tasks 0.20.5 → 0.20.6

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.
@@ -370,10 +370,10 @@ const snippetPi = (model, filepath) => {
370
370
  const modelsJson = JSON.stringify({
371
371
  providers: {
372
372
  [isMLX ? "mlx-lm" : "llama-cpp"]: {
373
- baseUrl: isMLX ? "http://localhost:8000/v1" : "http://localhost:8080/v1",
373
+ baseUrl: "http://localhost:8080/v1",
374
374
  api: "openai-completions",
375
375
  apiKey: "none",
376
- models: [{ id: modelName }],
376
+ models: [{ id: isMLX ? model.id : modelName }],
377
377
  },
378
378
  },
379
379
  }, null, 2);
@@ -143,8 +143,8 @@ curl -X POST "http://localhost:8000/v1/chat/completions" \\
143
143
  (0, vitest_1.expect)(snippet[0].setup).toContain("uv tool install mlx-lm");
144
144
  (0, vitest_1.expect)(snippet[0].content).toContain('mlx_lm.server --model "mlx-community/Llama-3.2-3B-Instruct-mlx"');
145
145
  (0, vitest_1.expect)(snippet[1].setup).toContain("npm install -g @mariozechner/pi-coding-agent");
146
- (0, vitest_1.expect)(snippet[1].content).toContain('"baseUrl": "http://localhost:8000/v1"');
147
- (0, vitest_1.expect)(snippet[1].content).toContain('"id": "Llama-3.2-3B-Instruct-mlx"');
146
+ (0, vitest_1.expect)(snippet[1].content).toContain('"baseUrl": "http://localhost:8080/v1"');
147
+ (0, vitest_1.expect)(snippet[1].content).toContain('"id": "mlx-community/Llama-3.2-3B-Instruct-mlx"');
148
148
  (0, vitest_1.expect)(snippet[2].content).toContain("pi");
149
149
  });
150
150
  (0, vitest_1.it)("docker model runner", async () => {
@@ -367,10 +367,10 @@ const snippetPi = (model, filepath) => {
367
367
  const modelsJson = JSON.stringify({
368
368
  providers: {
369
369
  [isMLX ? "mlx-lm" : "llama-cpp"]: {
370
- baseUrl: isMLX ? "http://localhost:8000/v1" : "http://localhost:8080/v1",
370
+ baseUrl: "http://localhost:8080/v1",
371
371
  api: "openai-completions",
372
372
  apiKey: "none",
373
- models: [{ id: modelName }],
373
+ models: [{ id: isMLX ? model.id : modelName }],
374
374
  },
375
375
  },
376
376
  }, null, 2);
@@ -141,8 +141,8 @@ curl -X POST "http://localhost:8000/v1/chat/completions" \\
141
141
  expect(snippet[0].setup).toContain("uv tool install mlx-lm");
142
142
  expect(snippet[0].content).toContain('mlx_lm.server --model "mlx-community/Llama-3.2-3B-Instruct-mlx"');
143
143
  expect(snippet[1].setup).toContain("npm install -g @mariozechner/pi-coding-agent");
144
- expect(snippet[1].content).toContain('"baseUrl": "http://localhost:8000/v1"');
145
- expect(snippet[1].content).toContain('"id": "Llama-3.2-3B-Instruct-mlx"');
144
+ expect(snippet[1].content).toContain('"baseUrl": "http://localhost:8080/v1"');
145
+ expect(snippet[1].content).toContain('"id": "mlx-community/Llama-3.2-3B-Instruct-mlx"');
146
146
  expect(snippet[2].content).toContain("pi");
147
147
  });
148
148
  it("docker model runner", async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
- "version": "0.20.5",
3
+ "version": "0.20.6",
4
4
  "description": "List of ML tasks for huggingface.co/tasks",
5
5
  "keywords": [
6
6
  "hub",
@@ -156,8 +156,8 @@ curl -X POST "http://localhost:8000/v1/chat/completions" \\
156
156
  expect(snippet[0].setup).toContain("uv tool install mlx-lm");
157
157
  expect(snippet[0].content).toContain('mlx_lm.server --model "mlx-community/Llama-3.2-3B-Instruct-mlx"');
158
158
  expect(snippet[1].setup).toContain("npm install -g @mariozechner/pi-coding-agent");
159
- expect(snippet[1].content).toContain('"baseUrl": "http://localhost:8000/v1"');
160
- expect(snippet[1].content).toContain('"id": "Llama-3.2-3B-Instruct-mlx"');
159
+ expect(snippet[1].content).toContain('"baseUrl": "http://localhost:8080/v1"');
160
+ expect(snippet[1].content).toContain('"id": "mlx-community/Llama-3.2-3B-Instruct-mlx"');
161
161
  expect(snippet[2].content).toContain("pi");
162
162
  });
163
163
 
package/src/local-apps.ts CHANGED
@@ -473,10 +473,10 @@ const snippetPi = (model: ModelData, filepath?: string): LocalAppSnippet[] => {
473
473
  {
474
474
  providers: {
475
475
  [isMLX ? "mlx-lm" : "llama-cpp"]: {
476
- baseUrl: isMLX ? "http://localhost:8000/v1" : "http://localhost:8080/v1",
476
+ baseUrl: "http://localhost:8080/v1",
477
477
  api: "openai-completions",
478
478
  apiKey: "none",
479
- models: [{ id: modelName }],
479
+ models: [{ id: isMLX ? model.id : modelName }],
480
480
  },
481
481
  },
482
482
  },