@huggingface/tasks 0.12.29 → 0.13.0
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 +47 -52
- package/dist/index.js +47 -52
- package/dist/src/model-libraries-snippets.d.ts +1 -0
- package/dist/src/model-libraries-snippets.d.ts.map +1 -1
- package/dist/src/model-libraries.d.ts +9 -2
- package/dist/src/model-libraries.d.ts.map +1 -1
- package/dist/src/snippets/common.d.ts +6 -12
- package/dist/src/snippets/common.d.ts.map +1 -1
- package/dist/src/snippets/curl.d.ts.map +1 -1
- package/dist/src/snippets/curl.spec.d.ts +2 -0
- package/dist/src/snippets/curl.spec.d.ts.map +1 -0
- package/dist/src/snippets/inputs.d.ts.map +1 -1
- package/dist/src/snippets/js.d.ts.map +1 -1
- package/dist/src/snippets/js.spec.d.ts +2 -0
- package/dist/src/snippets/js.spec.d.ts.map +1 -0
- package/dist/src/snippets/python.d.ts.map +1 -1
- package/dist/src/snippets/python.spec.d.ts +2 -0
- package/dist/src/snippets/python.spec.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/model-libraries-snippets.ts +17 -0
- package/src/model-libraries.ts +7 -0
- package/src/snippets/common.ts +27 -51
- package/src/snippets/curl.spec.ts +68 -0
- package/src/snippets/curl.ts +2 -6
- package/src/snippets/inputs.ts +1 -0
- package/src/snippets/js.spec.ts +86 -0
- package/src/snippets/js.ts +4 -6
- package/src/snippets/python.spec.ts +78 -0
- package/src/snippets/python.ts +4 -11
package/dist/index.cjs
CHANGED
|
@@ -4838,6 +4838,22 @@ var gliner = (model) => [
|
|
|
4838
4838
|
|
|
4839
4839
|
model = GLiNER.from_pretrained("${model.id}")`
|
|
4840
4840
|
];
|
|
4841
|
+
var htrflow = (model) => [
|
|
4842
|
+
`# CLI usage
|
|
4843
|
+
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
|
|
4844
|
+
htrflow pipeline <path/to/pipeline.yaml> <path/to/image>`,
|
|
4845
|
+
`# Python usage
|
|
4846
|
+
from htrflow.pipeline.pipeline import Pipeline
|
|
4847
|
+
from htrflow.pipeline.steps import Task
|
|
4848
|
+
from htrflow.models.framework.model import ModelClass
|
|
4849
|
+
|
|
4850
|
+
pipeline = Pipeline(
|
|
4851
|
+
[
|
|
4852
|
+
Task(
|
|
4853
|
+
ModelClass, {"model": "${model.id}"}, {}
|
|
4854
|
+
),
|
|
4855
|
+
])`
|
|
4856
|
+
];
|
|
4841
4857
|
var keras = (model) => [
|
|
4842
4858
|
`# Available backend options are: "jax", "torch", "tensorflow".
|
|
4843
4859
|
import os
|
|
@@ -5759,6 +5775,13 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
5759
5775
|
docsUrl: "https://hezarai.github.io/hezar",
|
|
5760
5776
|
countDownloads: `path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"`
|
|
5761
5777
|
},
|
|
5778
|
+
htrflow: {
|
|
5779
|
+
prettyLabel: "HTRflow",
|
|
5780
|
+
repoName: "HTRflow",
|
|
5781
|
+
repoUrl: "https://github.com/AI-Riksarkivet/htrflow",
|
|
5782
|
+
docsUrl: "https://ai-riksarkivet.github.io/htrflow",
|
|
5783
|
+
snippets: htrflow
|
|
5784
|
+
},
|
|
5762
5785
|
"hunyuan-dit": {
|
|
5763
5786
|
prettyLabel: "HunyuanDiT",
|
|
5764
5787
|
repoName: "HunyuanDiT",
|
|
@@ -6358,6 +6381,7 @@ var modelInputSnippets = {
|
|
|
6358
6381
|
"tabular-classification": inputsTabularPrediction,
|
|
6359
6382
|
"text-classification": inputsTextClassification,
|
|
6360
6383
|
"text-generation": inputsTextGeneration,
|
|
6384
|
+
"image-text-to-text": inputsTextGeneration,
|
|
6361
6385
|
"text-to-image": inputsTextToImage,
|
|
6362
6386
|
"text-to-speech": inputsTextToSpeech,
|
|
6363
6387
|
"text-to-audio": inputsTextToAudio,
|
|
@@ -6402,34 +6426,22 @@ __export(curl_exports, {
|
|
|
6402
6426
|
|
|
6403
6427
|
// src/snippets/common.ts
|
|
6404
6428
|
function stringifyMessages(messages, opts) {
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
type,
|
|
6418
|
-
image_url,
|
|
6419
|
-
...text ? { text: JSON.stringify(text).slice(1, -1) } : void 0
|
|
6420
|
-
}));
|
|
6421
|
-
content = JSON.stringify(content).slice(1, -1);
|
|
6422
|
-
if (opts.customContentEscaper) {
|
|
6423
|
-
content = opts.customContentEscaper(content);
|
|
6424
|
-
}
|
|
6425
|
-
return `{ ${keyRole}: "${role}", ${keyContent}: [${content}] }`;
|
|
6426
|
-
}
|
|
6427
|
-
});
|
|
6428
|
-
return opts.start + messagesStringified.join(opts.sep) + opts.end;
|
|
6429
|
+
let messagesStr = JSON.stringify(messages, null, " ");
|
|
6430
|
+
if (opts?.indent) {
|
|
6431
|
+
messagesStr = messagesStr.replaceAll("\n", `
|
|
6432
|
+
${opts.indent}`);
|
|
6433
|
+
}
|
|
6434
|
+
if (!opts?.attributeKeyQuotes) {
|
|
6435
|
+
messagesStr = messagesStr.replace(/"([^"]+)":/g, "$1:");
|
|
6436
|
+
}
|
|
6437
|
+
if (opts?.customContentEscaper) {
|
|
6438
|
+
messagesStr = opts.customContentEscaper(messagesStr);
|
|
6439
|
+
}
|
|
6440
|
+
return messagesStr;
|
|
6429
6441
|
}
|
|
6430
6442
|
function stringifyGenerationConfig(config, opts) {
|
|
6431
6443
|
const quote = opts.attributeKeyQuotes ? `"` : "";
|
|
6432
|
-
return
|
|
6444
|
+
return Object.entries(config).map(([key, val]) => `${quote}${key}${quote}${opts.attributeValueConnector}${val}`).join(`,${opts.indent}`);
|
|
6433
6445
|
}
|
|
6434
6446
|
|
|
6435
6447
|
// src/snippets/curl.ts
|
|
@@ -6457,18 +6469,12 @@ var snippetTextGeneration = (model, accessToken, opts) => {
|
|
|
6457
6469
|
--data '{
|
|
6458
6470
|
"model": "${model.id}",
|
|
6459
6471
|
"messages": ${stringifyMessages(messages, {
|
|
6460
|
-
|
|
6461
|
-
start: `[
|
|
6462
|
-
`,
|
|
6463
|
-
end: `
|
|
6464
|
-
]`,
|
|
6472
|
+
indent: " ",
|
|
6465
6473
|
attributeKeyQuotes: true,
|
|
6466
6474
|
customContentEscaper: (str) => str.replace(/'/g, "'\\''")
|
|
6467
6475
|
})},
|
|
6468
6476
|
${stringifyGenerationConfig(config, {
|
|
6469
|
-
|
|
6470
|
-
start: "",
|
|
6471
|
-
end: "",
|
|
6477
|
+
indent: "\n ",
|
|
6472
6478
|
attributeKeyQuotes: true,
|
|
6473
6479
|
attributeValueConnector: ": "
|
|
6474
6480
|
})},
|
|
@@ -6545,23 +6551,14 @@ var snippetConversational = (model, accessToken, opts) => {
|
|
|
6545
6551
|
const streaming = opts?.streaming ?? true;
|
|
6546
6552
|
const exampleMessages = getModelInputSnippet(model);
|
|
6547
6553
|
const messages = opts?.messages ?? exampleMessages;
|
|
6548
|
-
const messagesStr = stringifyMessages(messages, {
|
|
6549
|
-
sep: ",\n ",
|
|
6550
|
-
start: `[
|
|
6551
|
-
`,
|
|
6552
|
-
end: `
|
|
6553
|
-
]`,
|
|
6554
|
-
attributeKeyQuotes: true
|
|
6555
|
-
});
|
|
6554
|
+
const messagesStr = stringifyMessages(messages, { attributeKeyQuotes: true });
|
|
6556
6555
|
const config = {
|
|
6557
6556
|
...opts?.temperature ? { temperature: opts.temperature } : void 0,
|
|
6558
6557
|
max_tokens: opts?.max_tokens ?? 500,
|
|
6559
6558
|
...opts?.top_p ? { top_p: opts.top_p } : void 0
|
|
6560
6559
|
};
|
|
6561
6560
|
const configStr = stringifyGenerationConfig(config, {
|
|
6562
|
-
|
|
6563
|
-
start: "",
|
|
6564
|
-
end: "",
|
|
6561
|
+
indent: "\n ",
|
|
6565
6562
|
attributeValueConnector: "="
|
|
6566
6563
|
});
|
|
6567
6564
|
if (streaming) {
|
|
@@ -6582,7 +6579,7 @@ stream = client.chat.completions.create(
|
|
|
6582
6579
|
)
|
|
6583
6580
|
|
|
6584
6581
|
for chunk in stream:
|
|
6585
|
-
print(chunk.choices[0].delta.content)`
|
|
6582
|
+
print(chunk.choices[0].delta.content, end="")`
|
|
6586
6583
|
},
|
|
6587
6584
|
{
|
|
6588
6585
|
client: "openai",
|
|
@@ -6603,7 +6600,7 @@ stream = client.chat.completions.create(
|
|
|
6603
6600
|
)
|
|
6604
6601
|
|
|
6605
6602
|
for chunk in stream:
|
|
6606
|
-
print(chunk.choices[0].delta.content)`
|
|
6603
|
+
print(chunk.choices[0].delta.content, end="")`
|
|
6607
6604
|
}
|
|
6608
6605
|
];
|
|
6609
6606
|
} else {
|
|
@@ -6843,22 +6840,20 @@ var snippetTextGeneration2 = (model, accessToken, opts) => {
|
|
|
6843
6840
|
const streaming = opts?.streaming ?? true;
|
|
6844
6841
|
const exampleMessages = getModelInputSnippet(model);
|
|
6845
6842
|
const messages = opts?.messages ?? exampleMessages;
|
|
6846
|
-
const messagesStr = stringifyMessages(messages, {
|
|
6843
|
+
const messagesStr = stringifyMessages(messages, { indent: " " });
|
|
6847
6844
|
const config = {
|
|
6848
6845
|
...opts?.temperature ? { temperature: opts.temperature } : void 0,
|
|
6849
6846
|
max_tokens: opts?.max_tokens ?? 500,
|
|
6850
6847
|
...opts?.top_p ? { top_p: opts.top_p } : void 0
|
|
6851
6848
|
};
|
|
6852
6849
|
const configStr = stringifyGenerationConfig(config, {
|
|
6853
|
-
|
|
6854
|
-
start: "",
|
|
6855
|
-
end: "",
|
|
6850
|
+
indent: "\n ",
|
|
6856
6851
|
attributeValueConnector: ": "
|
|
6857
6852
|
});
|
|
6858
6853
|
if (streaming) {
|
|
6859
6854
|
return [
|
|
6860
6855
|
{
|
|
6861
|
-
client: "
|
|
6856
|
+
client: "huggingface.js",
|
|
6862
6857
|
content: `import { HfInference } from "@huggingface/inference"
|
|
6863
6858
|
|
|
6864
6859
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
|
@@ -6909,7 +6904,7 @@ for await (const chunk of stream) {
|
|
|
6909
6904
|
} else {
|
|
6910
6905
|
return [
|
|
6911
6906
|
{
|
|
6912
|
-
client: "
|
|
6907
|
+
client: "huggingface.js",
|
|
6913
6908
|
content: `import { HfInference } from '@huggingface/inference'
|
|
6914
6909
|
|
|
6915
6910
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
package/dist/index.js
CHANGED
|
@@ -4796,6 +4796,22 @@ var gliner = (model) => [
|
|
|
4796
4796
|
|
|
4797
4797
|
model = GLiNER.from_pretrained("${model.id}")`
|
|
4798
4798
|
];
|
|
4799
|
+
var htrflow = (model) => [
|
|
4800
|
+
`# CLI usage
|
|
4801
|
+
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
|
|
4802
|
+
htrflow pipeline <path/to/pipeline.yaml> <path/to/image>`,
|
|
4803
|
+
`# Python usage
|
|
4804
|
+
from htrflow.pipeline.pipeline import Pipeline
|
|
4805
|
+
from htrflow.pipeline.steps import Task
|
|
4806
|
+
from htrflow.models.framework.model import ModelClass
|
|
4807
|
+
|
|
4808
|
+
pipeline = Pipeline(
|
|
4809
|
+
[
|
|
4810
|
+
Task(
|
|
4811
|
+
ModelClass, {"model": "${model.id}"}, {}
|
|
4812
|
+
),
|
|
4813
|
+
])`
|
|
4814
|
+
];
|
|
4799
4815
|
var keras = (model) => [
|
|
4800
4816
|
`# Available backend options are: "jax", "torch", "tensorflow".
|
|
4801
4817
|
import os
|
|
@@ -5717,6 +5733,13 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
5717
5733
|
docsUrl: "https://hezarai.github.io/hezar",
|
|
5718
5734
|
countDownloads: `path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"`
|
|
5719
5735
|
},
|
|
5736
|
+
htrflow: {
|
|
5737
|
+
prettyLabel: "HTRflow",
|
|
5738
|
+
repoName: "HTRflow",
|
|
5739
|
+
repoUrl: "https://github.com/AI-Riksarkivet/htrflow",
|
|
5740
|
+
docsUrl: "https://ai-riksarkivet.github.io/htrflow",
|
|
5741
|
+
snippets: htrflow
|
|
5742
|
+
},
|
|
5720
5743
|
"hunyuan-dit": {
|
|
5721
5744
|
prettyLabel: "HunyuanDiT",
|
|
5722
5745
|
repoName: "HunyuanDiT",
|
|
@@ -6316,6 +6339,7 @@ var modelInputSnippets = {
|
|
|
6316
6339
|
"tabular-classification": inputsTabularPrediction,
|
|
6317
6340
|
"text-classification": inputsTextClassification,
|
|
6318
6341
|
"text-generation": inputsTextGeneration,
|
|
6342
|
+
"image-text-to-text": inputsTextGeneration,
|
|
6319
6343
|
"text-to-image": inputsTextToImage,
|
|
6320
6344
|
"text-to-speech": inputsTextToSpeech,
|
|
6321
6345
|
"text-to-audio": inputsTextToAudio,
|
|
@@ -6360,34 +6384,22 @@ __export(curl_exports, {
|
|
|
6360
6384
|
|
|
6361
6385
|
// src/snippets/common.ts
|
|
6362
6386
|
function stringifyMessages(messages, opts) {
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
type,
|
|
6376
|
-
image_url,
|
|
6377
|
-
...text ? { text: JSON.stringify(text).slice(1, -1) } : void 0
|
|
6378
|
-
}));
|
|
6379
|
-
content = JSON.stringify(content).slice(1, -1);
|
|
6380
|
-
if (opts.customContentEscaper) {
|
|
6381
|
-
content = opts.customContentEscaper(content);
|
|
6382
|
-
}
|
|
6383
|
-
return `{ ${keyRole}: "${role}", ${keyContent}: [${content}] }`;
|
|
6384
|
-
}
|
|
6385
|
-
});
|
|
6386
|
-
return opts.start + messagesStringified.join(opts.sep) + opts.end;
|
|
6387
|
+
let messagesStr = JSON.stringify(messages, null, " ");
|
|
6388
|
+
if (opts?.indent) {
|
|
6389
|
+
messagesStr = messagesStr.replaceAll("\n", `
|
|
6390
|
+
${opts.indent}`);
|
|
6391
|
+
}
|
|
6392
|
+
if (!opts?.attributeKeyQuotes) {
|
|
6393
|
+
messagesStr = messagesStr.replace(/"([^"]+)":/g, "$1:");
|
|
6394
|
+
}
|
|
6395
|
+
if (opts?.customContentEscaper) {
|
|
6396
|
+
messagesStr = opts.customContentEscaper(messagesStr);
|
|
6397
|
+
}
|
|
6398
|
+
return messagesStr;
|
|
6387
6399
|
}
|
|
6388
6400
|
function stringifyGenerationConfig(config, opts) {
|
|
6389
6401
|
const quote = opts.attributeKeyQuotes ? `"` : "";
|
|
6390
|
-
return
|
|
6402
|
+
return Object.entries(config).map(([key, val]) => `${quote}${key}${quote}${opts.attributeValueConnector}${val}`).join(`,${opts.indent}`);
|
|
6391
6403
|
}
|
|
6392
6404
|
|
|
6393
6405
|
// src/snippets/curl.ts
|
|
@@ -6415,18 +6427,12 @@ var snippetTextGeneration = (model, accessToken, opts) => {
|
|
|
6415
6427
|
--data '{
|
|
6416
6428
|
"model": "${model.id}",
|
|
6417
6429
|
"messages": ${stringifyMessages(messages, {
|
|
6418
|
-
|
|
6419
|
-
start: `[
|
|
6420
|
-
`,
|
|
6421
|
-
end: `
|
|
6422
|
-
]`,
|
|
6430
|
+
indent: " ",
|
|
6423
6431
|
attributeKeyQuotes: true,
|
|
6424
6432
|
customContentEscaper: (str) => str.replace(/'/g, "'\\''")
|
|
6425
6433
|
})},
|
|
6426
6434
|
${stringifyGenerationConfig(config, {
|
|
6427
|
-
|
|
6428
|
-
start: "",
|
|
6429
|
-
end: "",
|
|
6435
|
+
indent: "\n ",
|
|
6430
6436
|
attributeKeyQuotes: true,
|
|
6431
6437
|
attributeValueConnector: ": "
|
|
6432
6438
|
})},
|
|
@@ -6503,23 +6509,14 @@ var snippetConversational = (model, accessToken, opts) => {
|
|
|
6503
6509
|
const streaming = opts?.streaming ?? true;
|
|
6504
6510
|
const exampleMessages = getModelInputSnippet(model);
|
|
6505
6511
|
const messages = opts?.messages ?? exampleMessages;
|
|
6506
|
-
const messagesStr = stringifyMessages(messages, {
|
|
6507
|
-
sep: ",\n ",
|
|
6508
|
-
start: `[
|
|
6509
|
-
`,
|
|
6510
|
-
end: `
|
|
6511
|
-
]`,
|
|
6512
|
-
attributeKeyQuotes: true
|
|
6513
|
-
});
|
|
6512
|
+
const messagesStr = stringifyMessages(messages, { attributeKeyQuotes: true });
|
|
6514
6513
|
const config = {
|
|
6515
6514
|
...opts?.temperature ? { temperature: opts.temperature } : void 0,
|
|
6516
6515
|
max_tokens: opts?.max_tokens ?? 500,
|
|
6517
6516
|
...opts?.top_p ? { top_p: opts.top_p } : void 0
|
|
6518
6517
|
};
|
|
6519
6518
|
const configStr = stringifyGenerationConfig(config, {
|
|
6520
|
-
|
|
6521
|
-
start: "",
|
|
6522
|
-
end: "",
|
|
6519
|
+
indent: "\n ",
|
|
6523
6520
|
attributeValueConnector: "="
|
|
6524
6521
|
});
|
|
6525
6522
|
if (streaming) {
|
|
@@ -6540,7 +6537,7 @@ stream = client.chat.completions.create(
|
|
|
6540
6537
|
)
|
|
6541
6538
|
|
|
6542
6539
|
for chunk in stream:
|
|
6543
|
-
print(chunk.choices[0].delta.content)`
|
|
6540
|
+
print(chunk.choices[0].delta.content, end="")`
|
|
6544
6541
|
},
|
|
6545
6542
|
{
|
|
6546
6543
|
client: "openai",
|
|
@@ -6561,7 +6558,7 @@ stream = client.chat.completions.create(
|
|
|
6561
6558
|
)
|
|
6562
6559
|
|
|
6563
6560
|
for chunk in stream:
|
|
6564
|
-
print(chunk.choices[0].delta.content)`
|
|
6561
|
+
print(chunk.choices[0].delta.content, end="")`
|
|
6565
6562
|
}
|
|
6566
6563
|
];
|
|
6567
6564
|
} else {
|
|
@@ -6801,22 +6798,20 @@ var snippetTextGeneration2 = (model, accessToken, opts) => {
|
|
|
6801
6798
|
const streaming = opts?.streaming ?? true;
|
|
6802
6799
|
const exampleMessages = getModelInputSnippet(model);
|
|
6803
6800
|
const messages = opts?.messages ?? exampleMessages;
|
|
6804
|
-
const messagesStr = stringifyMessages(messages, {
|
|
6801
|
+
const messagesStr = stringifyMessages(messages, { indent: " " });
|
|
6805
6802
|
const config = {
|
|
6806
6803
|
...opts?.temperature ? { temperature: opts.temperature } : void 0,
|
|
6807
6804
|
max_tokens: opts?.max_tokens ?? 500,
|
|
6808
6805
|
...opts?.top_p ? { top_p: opts.top_p } : void 0
|
|
6809
6806
|
};
|
|
6810
6807
|
const configStr = stringifyGenerationConfig(config, {
|
|
6811
|
-
|
|
6812
|
-
start: "",
|
|
6813
|
-
end: "",
|
|
6808
|
+
indent: "\n ",
|
|
6814
6809
|
attributeValueConnector: ": "
|
|
6815
6810
|
});
|
|
6816
6811
|
if (streaming) {
|
|
6817
6812
|
return [
|
|
6818
6813
|
{
|
|
6819
|
-
client: "
|
|
6814
|
+
client: "huggingface.js",
|
|
6820
6815
|
content: `import { HfInference } from "@huggingface/inference"
|
|
6821
6816
|
|
|
6822
6817
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
|
@@ -6867,7 +6862,7 @@ for await (const chunk of stream) {
|
|
|
6867
6862
|
} else {
|
|
6868
6863
|
return [
|
|
6869
6864
|
{
|
|
6870
|
-
client: "
|
|
6865
|
+
client: "huggingface.js",
|
|
6871
6866
|
content: `import { HfInference } from '@huggingface/inference'
|
|
6872
6867
|
|
|
6873
6868
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
|
@@ -18,6 +18,7 @@ export declare const espnet: (model: ModelData) => string[];
|
|
|
18
18
|
export declare const fairseq: (model: ModelData) => string[];
|
|
19
19
|
export declare const flair: (model: ModelData) => string[];
|
|
20
20
|
export declare const gliner: (model: ModelData) => string[];
|
|
21
|
+
export declare const htrflow: (model: ModelData) => string[];
|
|
21
22
|
export declare const keras: (model: ModelData) => string[];
|
|
22
23
|
export declare const keras_nlp: (model: ModelData) => string[];
|
|
23
24
|
export declare const keras_hub: (model: ModelData) => string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAe9C,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAkBlD,CAAC;AAaF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,SAAS,KAAG,MAAM,EA6C1D,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAwBlD,CAAC;AAuCF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAUlD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,SAAS,KAAG,MAAM,EAwCrD,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,SAAS,KAAG,MAAM,EAgBzD,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,SAAS,KAAG,MAAM,EAmBrD,CAAC;AAEF,eAAO,MAAM,MAAM,UAAW,SAAS,KAAG,MAAM,EAgB/C,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAMlD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EASlD,CAAC;AAIF,eAAO,MAAM,MAAM,UAAW,SAAS,KAAG,MAAM,EAO/C,CAAC;AAEF,eAAO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A6BF,eAAO,MAAM,UAAU,UAAW,SAAS,KAAG,MAAM,EAUnD,CAAC;AAEF,eAAO,MAAM,UAAU,QAAO,MAAM,EAYnC,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,SAAS,KAAG,MAAM,EAKvD,CAAC;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC"}
|
|
@@ -312,6 +312,13 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
312
312
|
docsUrl: string;
|
|
313
313
|
countDownloads: string;
|
|
314
314
|
};
|
|
315
|
+
htrflow: {
|
|
316
|
+
prettyLabel: string;
|
|
317
|
+
repoName: string;
|
|
318
|
+
repoUrl: string;
|
|
319
|
+
docsUrl: string;
|
|
320
|
+
snippets: (model: ModelData) => string[];
|
|
321
|
+
};
|
|
315
322
|
"hunyuan-dit": {
|
|
316
323
|
prettyLabel: string;
|
|
317
324
|
repoName: string;
|
|
@@ -792,6 +799,6 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
792
799
|
};
|
|
793
800
|
};
|
|
794
801
|
export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
|
|
795
|
-
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "deepforest" | "depth-anything-v2" | "depth-pro" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-nlp" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "vfi-mamba" | "voicecraft" | "yolov10" | "whisperkit" | "3dtopia-xl")[];
|
|
796
|
-
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "deepforest" | "depth-anything-v2" | "depth-pro" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-nlp" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "vfi-mamba" | "voicecraft" | "yolov10" | "whisperkit" | "3dtopia-xl")[];
|
|
802
|
+
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "deepforest" | "depth-anything-v2" | "depth-pro" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-nlp" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "vfi-mamba" | "voicecraft" | "yolov10" | "whisperkit" | "3dtopia-xl")[];
|
|
803
|
+
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "deepforest" | "depth-anything-v2" | "depth-pro" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-nlp" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "vfi-mamba" | "voicecraft" | "yolov10" | "whisperkit" | "3dtopia-xl")[];
|
|
797
804
|
//# sourceMappingURL=model-libraries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0uBI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,22CAAgE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,22CAQ1B,CAAC"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import type { ChatCompletionInputMessage, GenerationParameters } from "../tasks";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
start: string;
|
|
5
|
-
end: string;
|
|
2
|
+
export declare function stringifyMessages(messages: ChatCompletionInputMessage[], opts?: {
|
|
3
|
+
indent?: string;
|
|
6
4
|
attributeKeyQuotes?: boolean;
|
|
7
5
|
customContentEscaper?: (str: string) => string;
|
|
8
|
-
}
|
|
9
|
-
export declare function stringifyMessages(messages: ChatCompletionInputMessage[], opts: StringifyMessagesOptions): string;
|
|
6
|
+
}): string;
|
|
10
7
|
type PartialGenerationParameters = Partial<Pick<GenerationParameters, "temperature" | "max_tokens" | "top_p">>;
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
start: string;
|
|
14
|
-
end: string;
|
|
8
|
+
export declare function stringifyGenerationConfig(config: PartialGenerationParameters, opts: {
|
|
9
|
+
indent: string;
|
|
15
10
|
attributeValueConnector: string;
|
|
16
11
|
attributeKeyQuotes?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function stringifyGenerationConfig(config: PartialGenerationParameters, opts: StringifyGenerationConfigOptions): string;
|
|
12
|
+
}): string;
|
|
19
13
|
export {};
|
|
20
14
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/snippets/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjF,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/snippets/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjF,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,0BAA0B,EAAE,EACtC,IAAI,CAAC,EAAE;IACN,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C,GACC,MAAM,CAYR;AAED,KAAK,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;AAE/G,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,2BAA2B,EACnC,IAAI,EAAE;IACL,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC7B,GACC,MAAM,CAMR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../src/snippets/curl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,YAAY,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAM1E,CAAC;AAEH,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,SACZ;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,
|
|
1
|
+
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../src/snippets/curl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,YAAY,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAM1E,CAAC;AAEH,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,SACZ;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAkCF,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAM3F,CAAC;AAEH,eAAO,MAAM,WAAW,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAKzE,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,OAAO,CACjC,MAAM,CACL,YAAY,EACZ,CAAC,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,gBAAgB,CAClG,CA0BD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAItG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG,OAAO,CAE9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curl.spec.d.ts","sourceRoot":"","sources":["../../../src/snippets/curl.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/snippets/inputs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/snippets/inputs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6IhD,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,gBAAgB,EACvB,MAAM,UAAQ,EACd,QAAQ,UAAQ,GACd,MAAM,GAAG,0BAA0B,EAAE,CAmBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/snippets/js.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,YAAY,UAAW,gBAAgB,eAAe,MAAM,KAAG,gBAoB1E,CAAC;AAEH,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,SACZ;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAAgB,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../../src/snippets/js.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,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"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../../src/snippets/python.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,SACZ;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"python.d.ts","sourceRoot":"","sources":["../../../src/snippets/python.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAErE,eAAO,MAAM,qBAAqB,UAC1B,gBAAgB,eACV,MAAM,SACZ;IACN,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CACtC,KACC,gBAAgB,EAiGlB,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAAW,gBAAgB,KAAG,gBAStE,CAAC;AAEH,eAAO,MAAM,kCAAkC,UAAW,gBAAgB,KAAG,gBAe3E,CAAC;AAEH,eAAO,MAAM,YAAY,UAAW,gBAAgB,KAAG,gBAQrD,CAAC;AAEH,eAAO,MAAM,WAAW,UAAW,gBAAgB,KAAG,gBAQpD,CAAC;AAEH,eAAO,MAAM,kBAAkB,UAAW,gBAAgB,KAAG,gBAW3D,CAAC;AAEH,eAAO,MAAM,cAAc,UAAW,gBAAgB,KAAG,gBAOvD,CAAC;AAEH,eAAO,MAAM,kBAAkB,UAAW,gBAAgB,KAAG,gBA+B5D,CAAC;AAEF,eAAO,MAAM,gCAAgC,UAAW,gBAAgB,KAAG,gBAWzE,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,OAAO,CACnC,MAAM,CACL,YAAY,EACZ,CACC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,gBAAgB,GAAG,gBAAgB,EAAE,CAC1C,CA8BD,CAAC;AAEF,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,gBAAgB,GAAG,gBAAgB,EAAE,CAwBvC;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAE1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python.spec.d.ts","sourceRoot":"","sources":["../../../src/snippets/python.spec.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"watch:types": "tsc --emitDeclarationOnly --declaration --watch",
|
|
47
47
|
"watch": "npm-run-all --parallel watch:export watch:types",
|
|
48
48
|
"check": "tsc",
|
|
49
|
+
"test": "vitest run",
|
|
49
50
|
"inference-codegen": "tsx scripts/inference-codegen.ts && prettier --write src/tasks/*/inference.ts",
|
|
50
51
|
"inference-tgi-import": "tsx scripts/inference-tgi-import.ts && prettier --write src/tasks/text-generation/spec/*.json && prettier --write src/tasks/chat-completion/spec/*.json",
|
|
51
52
|
"inference-tei-import": "tsx scripts/inference-tei-import.ts && prettier --write src/tasks/feature-extraction/spec/*.json"
|
|
@@ -363,6 +363,23 @@ export const gliner = (model: ModelData): string[] => [
|
|
|
363
363
|
model = GLiNER.from_pretrained("${model.id}")`,
|
|
364
364
|
];
|
|
365
365
|
|
|
366
|
+
export const htrflow = (model: ModelData): string[] => [
|
|
367
|
+
`# CLI usage
|
|
368
|
+
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
|
|
369
|
+
htrflow pipeline <path/to/pipeline.yaml> <path/to/image>`,
|
|
370
|
+
`# Python usage
|
|
371
|
+
from htrflow.pipeline.pipeline import Pipeline
|
|
372
|
+
from htrflow.pipeline.steps import Task
|
|
373
|
+
from htrflow.models.framework.model import ModelClass
|
|
374
|
+
|
|
375
|
+
pipeline = Pipeline(
|
|
376
|
+
[
|
|
377
|
+
Task(
|
|
378
|
+
ModelClass, {"model": "${model.id}"}, {}
|
|
379
|
+
),
|
|
380
|
+
])`,
|
|
381
|
+
];
|
|
382
|
+
|
|
366
383
|
export const keras = (model: ModelData): string[] => [
|
|
367
384
|
`# Available backend options are: "jax", "torch", "tensorflow".
|
|
368
385
|
import os
|
package/src/model-libraries.ts
CHANGED
|
@@ -317,6 +317,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
317
317
|
docsUrl: "https://hezarai.github.io/hezar",
|
|
318
318
|
countDownloads: `path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"`,
|
|
319
319
|
},
|
|
320
|
+
htrflow: {
|
|
321
|
+
prettyLabel: "HTRflow",
|
|
322
|
+
repoName: "HTRflow",
|
|
323
|
+
repoUrl: "https://github.com/AI-Riksarkivet/htrflow",
|
|
324
|
+
docsUrl: "https://ai-riksarkivet.github.io/htrflow",
|
|
325
|
+
snippets: snippets.htrflow,
|
|
326
|
+
},
|
|
320
327
|
"hunyuan-dit": {
|
|
321
328
|
prettyLabel: "HunyuanDiT",
|
|
322
329
|
repoName: "HunyuanDiT",
|
package/src/snippets/common.ts
CHANGED
|
@@ -1,63 +1,39 @@
|
|
|
1
1
|
import type { ChatCompletionInputMessage, GenerationParameters } from "../tasks";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} else {
|
|
23
|
-
2;
|
|
24
|
-
content = content.map(({ image_url, text, type }) => ({
|
|
25
|
-
type,
|
|
26
|
-
image_url,
|
|
27
|
-
...(text ? { text: JSON.stringify(text).slice(1, -1) } : undefined),
|
|
28
|
-
}));
|
|
29
|
-
content = JSON.stringify(content).slice(1, -1);
|
|
30
|
-
if (opts.customContentEscaper) {
|
|
31
|
-
content = opts.customContentEscaper(content);
|
|
32
|
-
}
|
|
33
|
-
return `{ ${keyRole}: "${role}", ${keyContent}: [${content}] }`;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
return opts.start + messagesStringified.join(opts.sep) + opts.end;
|
|
3
|
+
export function stringifyMessages(
|
|
4
|
+
messages: ChatCompletionInputMessage[],
|
|
5
|
+
opts?: {
|
|
6
|
+
indent?: string;
|
|
7
|
+
attributeKeyQuotes?: boolean;
|
|
8
|
+
customContentEscaper?: (str: string) => string;
|
|
9
|
+
}
|
|
10
|
+
): string {
|
|
11
|
+
let messagesStr = JSON.stringify(messages, null, "\t");
|
|
12
|
+
if (opts?.indent) {
|
|
13
|
+
messagesStr = messagesStr.replaceAll("\n", `\n${opts.indent}`);
|
|
14
|
+
}
|
|
15
|
+
if (!opts?.attributeKeyQuotes) {
|
|
16
|
+
messagesStr = messagesStr.replace(/"([^"]+)":/g, "$1:");
|
|
17
|
+
}
|
|
18
|
+
if (opts?.customContentEscaper) {
|
|
19
|
+
messagesStr = opts.customContentEscaper(messagesStr);
|
|
20
|
+
}
|
|
21
|
+
return messagesStr;
|
|
38
22
|
}
|
|
39
23
|
|
|
40
24
|
type PartialGenerationParameters = Partial<Pick<GenerationParameters, "temperature" | "max_tokens" | "top_p">>;
|
|
41
25
|
|
|
42
|
-
export interface StringifyGenerationConfigOptions {
|
|
43
|
-
sep: string;
|
|
44
|
-
start: string;
|
|
45
|
-
end: string;
|
|
46
|
-
attributeValueConnector: string;
|
|
47
|
-
attributeKeyQuotes?: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
26
|
export function stringifyGenerationConfig(
|
|
51
27
|
config: PartialGenerationParameters,
|
|
52
|
-
opts:
|
|
28
|
+
opts: {
|
|
29
|
+
indent: string;
|
|
30
|
+
attributeValueConnector: string;
|
|
31
|
+
attributeKeyQuotes?: boolean;
|
|
32
|
+
}
|
|
53
33
|
): string {
|
|
54
34
|
const quote = opts.attributeKeyQuotes ? `"` : "";
|
|
55
35
|
|
|
56
|
-
return (
|
|
57
|
-
opts.
|
|
58
|
-
|
|
59
|
-
.map(([key, val]) => `${quote}${key}${quote}${opts.attributeValueConnector}${val}`)
|
|
60
|
-
.join(opts.sep) +
|
|
61
|
-
opts.end
|
|
62
|
-
);
|
|
36
|
+
return Object.entries(config)
|
|
37
|
+
.map(([key, val]) => `${quote}${key}${quote}${opts.attributeValueConnector}${val}`)
|
|
38
|
+
.join(`,${opts.indent}`);
|
|
63
39
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ModelDataMinimal } from "./types";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { snippetTextGeneration } from "./curl";
|
|
4
|
+
|
|
5
|
+
describe("inference API snippets", () => {
|
|
6
|
+
it("conversational llm", async () => {
|
|
7
|
+
const model: ModelDataMinimal = {
|
|
8
|
+
id: "meta-llama/Llama-3.1-8B-Instruct",
|
|
9
|
+
pipeline_tag: "text-generation",
|
|
10
|
+
tags: ["conversational"],
|
|
11
|
+
inference: "",
|
|
12
|
+
};
|
|
13
|
+
const snippet = snippetTextGeneration(model, "api_token");
|
|
14
|
+
|
|
15
|
+
expect(snippet.content)
|
|
16
|
+
.toEqual(`curl 'https://api-inference.huggingface.co/models/meta-llama/Llama-3.1-8B-Instruct/v1/chat/completions' \\
|
|
17
|
+
-H "Authorization: Bearer api_token" \\
|
|
18
|
+
-H 'Content-Type: application/json' \\
|
|
19
|
+
--data '{
|
|
20
|
+
"model": "meta-llama/Llama-3.1-8B-Instruct",
|
|
21
|
+
"messages": [
|
|
22
|
+
{
|
|
23
|
+
"role": "user",
|
|
24
|
+
"content": "What is the capital of France?"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"max_tokens": 500,
|
|
28
|
+
"stream": true
|
|
29
|
+
}'`);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("conversational vlm", async () => {
|
|
33
|
+
const model: ModelDataMinimal = {
|
|
34
|
+
id: "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
35
|
+
pipeline_tag: "image-text-to-text",
|
|
36
|
+
tags: ["conversational"],
|
|
37
|
+
inference: "",
|
|
38
|
+
};
|
|
39
|
+
const snippet = snippetTextGeneration(model, "api_token");
|
|
40
|
+
|
|
41
|
+
expect(snippet.content)
|
|
42
|
+
.toEqual(`curl 'https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-11B-Vision-Instruct/v1/chat/completions' \\
|
|
43
|
+
-H "Authorization: Bearer api_token" \\
|
|
44
|
+
-H 'Content-Type: application/json' \\
|
|
45
|
+
--data '{
|
|
46
|
+
"model": "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
47
|
+
"messages": [
|
|
48
|
+
{
|
|
49
|
+
"role": "user",
|
|
50
|
+
"content": [
|
|
51
|
+
{
|
|
52
|
+
"type": "text",
|
|
53
|
+
"text": "Describe this image in one sentence."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "image_url",
|
|
57
|
+
"image_url": {
|
|
58
|
+
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"max_tokens": 500,
|
|
65
|
+
"stream": true
|
|
66
|
+
}'`);
|
|
67
|
+
});
|
|
68
|
+
});
|
package/src/snippets/curl.ts
CHANGED
|
@@ -41,16 +41,12 @@ export const snippetTextGeneration = (
|
|
|
41
41
|
--data '{
|
|
42
42
|
"model": "${model.id}",
|
|
43
43
|
"messages": ${stringifyMessages(messages, {
|
|
44
|
-
|
|
45
|
-
start: `[\n\t\t`,
|
|
46
|
-
end: `\n\t]`,
|
|
44
|
+
indent: "\t",
|
|
47
45
|
attributeKeyQuotes: true,
|
|
48
46
|
customContentEscaper: (str) => str.replace(/'/g, "'\\''"),
|
|
49
47
|
})},
|
|
50
48
|
${stringifyGenerationConfig(config, {
|
|
51
|
-
|
|
52
|
-
start: "",
|
|
53
|
-
end: "",
|
|
49
|
+
indent: "\n ",
|
|
54
50
|
attributeKeyQuotes: true,
|
|
55
51
|
attributeValueConnector: ": ",
|
|
56
52
|
})},
|
package/src/snippets/inputs.ts
CHANGED
|
@@ -128,6 +128,7 @@ const modelInputSnippets: {
|
|
|
128
128
|
"tabular-classification": inputsTabularPrediction,
|
|
129
129
|
"text-classification": inputsTextClassification,
|
|
130
130
|
"text-generation": inputsTextGeneration,
|
|
131
|
+
"image-text-to-text": inputsTextGeneration,
|
|
131
132
|
"text-to-image": inputsTextToImage,
|
|
132
133
|
"text-to-speech": inputsTextToSpeech,
|
|
133
134
|
"text-to-audio": inputsTextToAudio,
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { InferenceSnippet, ModelDataMinimal } from "./types";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { snippetTextGeneration } from "./js";
|
|
4
|
+
|
|
5
|
+
describe("inference API snippets", () => {
|
|
6
|
+
it("conversational llm", async () => {
|
|
7
|
+
const model: ModelDataMinimal = {
|
|
8
|
+
id: "meta-llama/Llama-3.1-8B-Instruct",
|
|
9
|
+
pipeline_tag: "text-generation",
|
|
10
|
+
tags: ["conversational"],
|
|
11
|
+
inference: "",
|
|
12
|
+
};
|
|
13
|
+
const snippet = snippetTextGeneration(model, "api_token") as InferenceSnippet[];
|
|
14
|
+
|
|
15
|
+
expect(snippet[0].content).toEqual(`import { HfInference } from "@huggingface/inference"
|
|
16
|
+
|
|
17
|
+
const client = new HfInference("api_token")
|
|
18
|
+
|
|
19
|
+
let out = "";
|
|
20
|
+
|
|
21
|
+
const stream = client.chatCompletionStream({
|
|
22
|
+
model: "meta-llama/Llama-3.1-8B-Instruct",
|
|
23
|
+
messages: [
|
|
24
|
+
{
|
|
25
|
+
role: "user",
|
|
26
|
+
content: "What is the capital of France?"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
max_tokens: 500
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
for await (const chunk of stream) {
|
|
33
|
+
if (chunk.choices && chunk.choices.length > 0) {
|
|
34
|
+
const newContent = chunk.choices[0].delta.content;
|
|
35
|
+
out += newContent;
|
|
36
|
+
console.log(newContent);
|
|
37
|
+
}
|
|
38
|
+
}`);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("conversational vlm", async () => {
|
|
42
|
+
const model: ModelDataMinimal = {
|
|
43
|
+
id: "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
44
|
+
pipeline_tag: "image-text-to-text",
|
|
45
|
+
tags: ["conversational"],
|
|
46
|
+
inference: "",
|
|
47
|
+
};
|
|
48
|
+
const snippet = snippetTextGeneration(model, "api_token") as InferenceSnippet[];
|
|
49
|
+
|
|
50
|
+
expect(snippet[0].content).toEqual(`import { HfInference } from "@huggingface/inference"
|
|
51
|
+
|
|
52
|
+
const client = new HfInference("api_token")
|
|
53
|
+
|
|
54
|
+
let out = "";
|
|
55
|
+
|
|
56
|
+
const stream = client.chatCompletionStream({
|
|
57
|
+
model: "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
58
|
+
messages: [
|
|
59
|
+
{
|
|
60
|
+
role: "user",
|
|
61
|
+
content: [
|
|
62
|
+
{
|
|
63
|
+
type: "text",
|
|
64
|
+
text: "Describe this image in one sentence."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: "image_url",
|
|
68
|
+
image_url: {
|
|
69
|
+
url: "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
max_tokens: 500
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
for await (const chunk of stream) {
|
|
79
|
+
if (chunk.choices && chunk.choices.length > 0) {
|
|
80
|
+
const newContent = chunk.choices[0].delta.content;
|
|
81
|
+
out += newContent;
|
|
82
|
+
console.log(newContent);
|
|
83
|
+
}
|
|
84
|
+
}`);
|
|
85
|
+
});
|
|
86
|
+
});
|
package/src/snippets/js.ts
CHANGED
|
@@ -42,7 +42,7 @@ export const snippetTextGeneration = (
|
|
|
42
42
|
const streaming = opts?.streaming ?? true;
|
|
43
43
|
const exampleMessages = getModelInputSnippet(model) as ChatCompletionInputMessage[];
|
|
44
44
|
const messages = opts?.messages ?? exampleMessages;
|
|
45
|
-
const messagesStr = stringifyMessages(messages, {
|
|
45
|
+
const messagesStr = stringifyMessages(messages, { indent: "\t" });
|
|
46
46
|
|
|
47
47
|
const config = {
|
|
48
48
|
...(opts?.temperature ? { temperature: opts.temperature } : undefined),
|
|
@@ -50,16 +50,14 @@ export const snippetTextGeneration = (
|
|
|
50
50
|
...(opts?.top_p ? { top_p: opts.top_p } : undefined),
|
|
51
51
|
};
|
|
52
52
|
const configStr = stringifyGenerationConfig(config, {
|
|
53
|
-
|
|
54
|
-
start: "",
|
|
55
|
-
end: "",
|
|
53
|
+
indent: "\n\t",
|
|
56
54
|
attributeValueConnector: ": ",
|
|
57
55
|
});
|
|
58
56
|
|
|
59
57
|
if (streaming) {
|
|
60
58
|
return [
|
|
61
59
|
{
|
|
62
|
-
client: "
|
|
60
|
+
client: "huggingface.js",
|
|
63
61
|
content: `import { HfInference } from "@huggingface/inference"
|
|
64
62
|
|
|
65
63
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
|
@@ -110,7 +108,7 @@ for await (const chunk of stream) {
|
|
|
110
108
|
} else {
|
|
111
109
|
return [
|
|
112
110
|
{
|
|
113
|
-
client: "
|
|
111
|
+
client: "huggingface.js",
|
|
114
112
|
content: `import { HfInference } from '@huggingface/inference'
|
|
115
113
|
|
|
116
114
|
const client = new HfInference("${accessToken || `{API_TOKEN}`}")
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ModelDataMinimal } from "./types";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { snippetConversational } from "./python";
|
|
4
|
+
|
|
5
|
+
describe("inference API snippets", () => {
|
|
6
|
+
it("conversational llm", async () => {
|
|
7
|
+
const model: ModelDataMinimal = {
|
|
8
|
+
id: "meta-llama/Llama-3.1-8B-Instruct",
|
|
9
|
+
pipeline_tag: "text-generation",
|
|
10
|
+
tags: ["conversational"],
|
|
11
|
+
inference: "",
|
|
12
|
+
};
|
|
13
|
+
const snippet = snippetConversational(model, "api_token");
|
|
14
|
+
|
|
15
|
+
expect(snippet[0].content).toEqual(`from huggingface_hub import InferenceClient
|
|
16
|
+
|
|
17
|
+
client = InferenceClient(api_key="api_token")
|
|
18
|
+
|
|
19
|
+
messages = [
|
|
20
|
+
{
|
|
21
|
+
"role": "user",
|
|
22
|
+
"content": "What is the capital of France?"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
stream = client.chat.completions.create(
|
|
27
|
+
model="meta-llama/Llama-3.1-8B-Instruct",
|
|
28
|
+
messages=messages,
|
|
29
|
+
max_tokens=500,
|
|
30
|
+
stream=True
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
for chunk in stream:
|
|
34
|
+
print(chunk.choices[0].delta.content, end="")`);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("conversational vlm", async () => {
|
|
38
|
+
const model: ModelDataMinimal = {
|
|
39
|
+
id: "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
40
|
+
pipeline_tag: "image-text-to-text",
|
|
41
|
+
tags: ["conversational"],
|
|
42
|
+
inference: "",
|
|
43
|
+
};
|
|
44
|
+
const snippet = snippetConversational(model, "api_token");
|
|
45
|
+
|
|
46
|
+
expect(snippet[0].content).toEqual(`from huggingface_hub import InferenceClient
|
|
47
|
+
|
|
48
|
+
client = InferenceClient(api_key="api_token")
|
|
49
|
+
|
|
50
|
+
messages = [
|
|
51
|
+
{
|
|
52
|
+
"role": "user",
|
|
53
|
+
"content": [
|
|
54
|
+
{
|
|
55
|
+
"type": "text",
|
|
56
|
+
"text": "Describe this image in one sentence."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "image_url",
|
|
60
|
+
"image_url": {
|
|
61
|
+
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
stream = client.chat.completions.create(
|
|
69
|
+
model="meta-llama/Llama-3.2-11B-Vision-Instruct",
|
|
70
|
+
messages=messages,
|
|
71
|
+
max_tokens=500,
|
|
72
|
+
stream=True
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
for chunk in stream:
|
|
76
|
+
print(chunk.choices[0].delta.content, end="")`);
|
|
77
|
+
});
|
|
78
|
+
});
|
package/src/snippets/python.ts
CHANGED
|
@@ -18,12 +18,7 @@ export const snippetConversational = (
|
|
|
18
18
|
const streaming = opts?.streaming ?? true;
|
|
19
19
|
const exampleMessages = getModelInputSnippet(model) as ChatCompletionInputMessage[];
|
|
20
20
|
const messages = opts?.messages ?? exampleMessages;
|
|
21
|
-
const messagesStr = stringifyMessages(messages, {
|
|
22
|
-
sep: ",\n\t",
|
|
23
|
-
start: `[\n\t`,
|
|
24
|
-
end: `\n]`,
|
|
25
|
-
attributeKeyQuotes: true,
|
|
26
|
-
});
|
|
21
|
+
const messagesStr = stringifyMessages(messages, { attributeKeyQuotes: true });
|
|
27
22
|
|
|
28
23
|
const config = {
|
|
29
24
|
...(opts?.temperature ? { temperature: opts.temperature } : undefined),
|
|
@@ -31,9 +26,7 @@ export const snippetConversational = (
|
|
|
31
26
|
...(opts?.top_p ? { top_p: opts.top_p } : undefined),
|
|
32
27
|
};
|
|
33
28
|
const configStr = stringifyGenerationConfig(config, {
|
|
34
|
-
|
|
35
|
-
start: "",
|
|
36
|
-
end: "",
|
|
29
|
+
indent: "\n\t",
|
|
37
30
|
attributeValueConnector: "=",
|
|
38
31
|
});
|
|
39
32
|
|
|
@@ -55,7 +48,7 @@ stream = client.chat.completions.create(
|
|
|
55
48
|
)
|
|
56
49
|
|
|
57
50
|
for chunk in stream:
|
|
58
|
-
print(chunk.choices[0].delta.content)`,
|
|
51
|
+
print(chunk.choices[0].delta.content, end="")`,
|
|
59
52
|
},
|
|
60
53
|
{
|
|
61
54
|
client: "openai",
|
|
@@ -76,7 +69,7 @@ stream = client.chat.completions.create(
|
|
|
76
69
|
)
|
|
77
70
|
|
|
78
71
|
for chunk in stream:
|
|
79
|
-
print(chunk.choices[0].delta.content)`,
|
|
72
|
+
print(chunk.choices[0].delta.content, end="")`,
|
|
80
73
|
},
|
|
81
74
|
];
|
|
82
75
|
} else {
|