You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/doc-internal/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,16 @@
5
5
"description": "Package to generate doc for other @huggingface packages",
6
6
"private": true,
7
7
"scripts": {
8
-
"start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-agents && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks",
8
+
"start": "pnpm run fix-cdn-versions && pnpm run doc-hub && pnpm run doc-inference && pnpm run doc-space-header && pnpm run doc-gguf && pnpm run doc-mcp-client && pnpm run doc-tiny-agents && cp ../../README.md ../../docs/index.md && pnpm run update-toc && pnpm run fix-md-links && pnpm run fix-md-headinghashlinks",
"The type of repo to upload to. Defaults to model. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
84
83
},
@@ -126,9 +125,8 @@ const commands = {
126
125
{
127
126
name: "repo-type" as const,
128
127
enum: ["dataset", "model", "space"],
129
-
default: "model",
130
128
description:
131
-
"The type of repo to create. Defaults to model. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
129
+
"The type of the repo to create the branch into. Defaults to model. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
132
130
},
133
131
{
134
132
name: "revision" as const,
@@ -173,7 +171,6 @@ const commands = {
173
171
{
174
172
name: "repo-type" as const,
175
173
enum: ["dataset", "model", "space"],
176
-
default: "model",
177
174
description:
178
175
"The type of repo to delete the branch from. Defaults to model. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
179
176
},
@@ -187,6 +184,35 @@ const commands = {
187
184
},
188
185
},
189
186
} satisfies CommandGroup,
187
+
repo: {
188
+
description: "Manage repositories on the Hub",
189
+
subcommands: {
190
+
delete: {
191
+
description: "Delete a repository from the Hub",
192
+
args: [
193
+
{
194
+
name: "repo-name" as const,
195
+
description:
196
+
"The name of the repo to delete. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
197
+
positional: true,
198
+
required: true,
199
+
},
200
+
{
201
+
name: "repo-type" as const,
202
+
enum: ["dataset", "model", "space"],
203
+
description:
204
+
"The type of the repo to delete. Defaults to model. You can also prefix the repo name with the type, e.g. datasets/username/repo-name",
205
+
},
206
+
{
207
+
name: "token" as const,
208
+
description:
209
+
"The access token to use for authentication. If not provided, the HF_TOKEN environment variable will be used.",
-[Novita AI supported models](https://huggingface.co/api/partners/novita/models)
99
100
100
101
❗**Important note:** To be compatible, the third-party API must adhere to the "standard" shape API we expect on HF model pages for each pipeline task type.
101
102
This is not an issue for LLMs as everyone converged on the OpenAI API anyways, but can be more tricky for other tasks like "text-to-image" or "automatic-speech-recognition" where there exists no standard API. Let us know if any help is needed or if we can make things easier for you!
@@ -119,6 +120,108 @@ await textGeneration({
119
120
120
121
This will enable tree-shaking by your bundler.
121
122
123
+
### Error handling
124
+
125
+
The inference package provides specific error types to help you handle different error scenarios effectively.
126
+
127
+
#### Error Types
128
+
129
+
The package defines several error types that extend the base `Error` class:
130
+
131
+
-`InferenceClientError`: Base error class for all Hugging Face Inference errors
132
+
-`InferenceClientInputError`: Thrown when there are issues with input parameters
133
+
-`InferenceClientProviderApiError`: Thrown when there are API-level errors from providers
134
+
-`InferenceClientHubApiError`: Thrown when there are API-levels errors from the Hugging Face Hub
135
+
-`InferenceClientProviderOutputError`: Thrown when there are issues with providers' API responses format
0 commit comments