Skip to content

Commit 81f1afc

Browse files
HuggingFaceInfraWauplinhanouticelina
authored
[Bot] Update Inference Providers documentation (#1788)
* Update Inference Providers documentation (automated) * Update Inference Providers documentation (automated) * regenerate * Update Inference Providers documentation (automated) * fix * better wording * Update Inference Providers documentation (automated) * bump inference * Update Inference Providers documentation (automated) * don't consider a task if all models are staging * fix --------- Co-authored-by: Wauplin <[email protected]> Co-authored-by: Celina Hanouti <[email protected]>
1 parent a7a2e2a commit 81f1afc

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

scripts/inference-providers/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "",
1515
"license": "ISC",
1616
"dependencies": {
17-
"@huggingface/inference": "^4.0.4",
18-
"@huggingface/tasks": "^0.19.15",
17+
"@huggingface/inference": "^4.2.0",
18+
"@huggingface/tasks": "^0.19.19",
1919
"@types/node": "^22.5.0",
2020
"handlebars": "^4.7.8",
2121
"node": "^20.17.0",

scripts/inference-providers/pnpm-lock.yaml

Lines changed: 16 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/inference-providers/scripts/generate.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ await Promise.all(
120120
>;
121121

122122
for (const [task, models] of Object.entries(mapping)) {
123-
for (const [modelId, modelMapping] of Object.entries(models)) {
124-
if (modelMapping.status == "live") {
125-
if (!PER_TASK_SUPPORTED_PROVIDERS[task]) {
126-
PER_TASK_SUPPORTED_PROVIDERS[task] = [];
127-
}
128-
PER_TASK_SUPPORTED_PROVIDERS[task].push(provider);
129-
break;
123+
const hasLiveModel = Object.values(models).some(
124+
(model) => model.status === "live",
125+
);
126+
127+
if (hasLiveModel) {
128+
if (!PER_TASK_SUPPORTED_PROVIDERS[task]) {
129+
PER_TASK_SUPPORTED_PROVIDERS[task] = [];
130130
}
131+
PER_TASK_SUPPORTED_PROVIDERS[task].push(provider);
131132
}
132133
}
133134
}),

0 commit comments

Comments
 (0)