Huggingface.js 文档

类别:InferenceClientInputError

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

类:InferenceClientInputError

所有推理相关错误的基类。

继承关系

构造函数

构造函数

new InferenceClientInputError(message): InferenceClientInputError

参数

名称 类型
消息 字符串

返回

InferenceClientInputError

重写

InferenceClientError.构造函数

定义于

推理/src/errors.ts:14

属性

原因

可选 cause: unknown

继承自

InferenceClientError.原因

定义于

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26


消息

message: string

继承自

InferenceClientError.消息

定义于

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1077


名称

name: string

继承自

InferenceClientError.名称

定义于

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1076


堆栈

可选 stack: string

继承自

InferenceClientError.堆栈

定义于

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1078


prepareStackTrace

静态 可选 prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

用于格式化堆栈跟踪的可选重写

请参阅

https://v8.node.org.cn/docs/stack-trace-api#customizing-stack-traces

类型声明

▸ (err, stackTraces): any

参数
名称 类型
错误 错误
堆栈跟踪 CallSite[]
返回

任何

继承自

InferenceClientError.prepareStackTrace

定义于

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:11


stackTraceLimit

静态 stackTraceLimit: number

继承自

InferenceClientError.stackTraceLimit

定义于

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:13

方法

captureStackTrace

captureStackTrace(targetObject, constructorOpt?): void

在目标对象上创建 .stack 属性

参数

名称 类型
目标对象 对象
constructorOpt? 函数

返回

继承自

InferenceClientError.captureStackTrace

定义于

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:4

< > 在 GitHub 上更新